Skip to content

Commit

Permalink
std.hash_map.HashMap: getOrPutAssumeCapacityAdapted should set key to…
Browse files Browse the repository at this point in the history
… undefined
  • Loading branch information
Hadron67 committed Jun 17, 2021
1 parent bfe3558 commit 09295ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/hash_map.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ pub fn HashMapUnmanaged(
metadata[0].fill(fingerprint);
const new_key = &self.keys()[idx];
const new_value = &self.values()[idx];
new_key.* = key;
new_key.* = undefined;
new_value.* = undefined;
self.size += 1;

Expand Down

0 comments on commit 09295ab

Please sign in to comment.