#How to use StringHashMap as a String set

1 messages · Page 1 of 1 (latest)

olive juniper
#

Isn't there a way to make the hash maps not require values? I've set the value type to void but I can't figure out how to put a value into the hash map.

quasi comet
#

you can get a value of type void like so: {}

olive juniper
#

🙏

quasi comet
#

though, in a std.StringHashMap you still need to deinitialise the keys yourself, as the map does not consider itself to own them - consider looking into std.BufSet

olive juniper
#

yeah i read that, its fine for my use case