| author | |
| committer | |
| log | 95f4c1532aa4fe7f0ec8f733f7e79c85d2c09b52 |
| tree | 2c82e3f14df0a18af2363898db4fd65ce7f80950 |
| parent | cf3572a66bb956eff319ebcb123784322e2553de |
2 files changed, 0 insertions(+), 3 deletions(-)
lib/std/heap/general_purpose_allocator.zig-2| ... | @@ -913,8 +913,6 @@ pub fn GeneralPurposeAllocator(comptime config: Config) type { | ... | @@ -913,8 +913,6 @@ pub fn GeneralPurposeAllocator(comptime config: Config) type { |
| 913 | // save the node for destruction/insertion into in empty_buckets | 913 | // save the node for destruction/insertion into in empty_buckets |
| 914 | var node = entry.node.?; | 914 | var node = entry.node.?; |
| 915 | entry.set(null); | 915 | entry.set(null); |
| 916 | // restore the node's key since Treap.remove sets it to undefined | ||
| 917 | node.key = bucket; | ||
| 918 | if (self.cur_buckets[bucket_index] == bucket) { | 916 | if (self.cur_buckets[bucket_index] == bucket) { |
| 919 | self.cur_buckets[bucket_index] = null; | 917 | self.cur_buckets[bucket_index] = null; |
| 920 | } | 918 | } |
lib/std/treap.zig-1| ... | @@ -225,7 +225,6 @@ pub fn Treap(comptime Key: type, comptime compareFn: anytype) type { | ... | @@ -225,7 +225,6 @@ pub fn Treap(comptime Key: type, comptime compareFn: anytype) type { |
| 225 | link.* = null; | 225 | link.* = null; |
| 226 | 226 | ||
| 227 | // clean up after ourselves | 227 | // clean up after ourselves |
| 228 | node.key = undefined; | ||
| 229 | node.priority = 0; | 228 | node.priority = 0; |
| 230 | node.parent = null; | 229 | node.parent = null; |
| 231 | node.children = [_]?*Node{ null, null }; | 230 | node.children = [_]?*Node{ null, null }; |