Skip to content

Commit

Permalink
hash_map: new implementation with open addressing and linear probing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahnvour committed Aug 9, 2020
1 parent b46de26 commit aecb1f3
Show file tree
Hide file tree
Showing 8 changed files with 1,192 additions and 28 deletions.
3 changes: 2 additions & 1 deletion lib/std/buf_set.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ pub const BufSet = struct {
}

pub fn deinit(self: *BufSet) void {
for (self.hash_map.items()) |entry| {
var it = self.hash_map.iterator();
while (it.next()) |entry| {
self.free(entry.key);
}
self.hash_map.deinit();
Expand Down
Loading

0 comments on commit aecb1f3

Please # to comment.