add assertLocked to std.debug.SafetyLock

This commit is contained in:
Scott Redig
2024-10-07 01:16:20 -07:00
committed by Andrew Kelley
parent 73dcd19140
commit b2c62bcbf6
2 changed files with 17 additions and 3 deletions

View File

@@ -1692,7 +1692,7 @@ pub fn HashMapUnmanaged(
}
self.size = 0;
self.pointer_stability = .{ .state = .unlocked };
self.pointer_stability = .{};
std.mem.swap(Self, self, &map);
map.deinit(allocator);
}