#how do you cleanly rehash std.AutoHashMapUnmanaged(K, V)

1 messages · Page 1 of 1 (latest)

stable wren
#

rehash on this type takes a context, but the context isn't exposed, i'm not entirely sure what to pass in

lone spire
#

its just std.hash.AutoContext(K) isnt it?

stable wren
#

hmmmm
yeah that does seem to work but that feels really ugly that i have to do that

#
        var ctx: std.hash_map.AutoContext(BufferId) = .{};
        self.handles.rehash(&ctx);
lone spire
#

yea

#

ig you could just pass handles.ctx lol

stable wren
#

that's only on the managed variant

lone spire
#

ah yeah

stable wren
#

idk why they want to inconvenience me specifically

#

this whole function is a plot to make me waste one line of code