std.ArrayHashMap: unmanaged holds the pointer stability lock

This commit is contained in:
Krzysztof Wolicki 2024-07-07 12:13:07 +02:00
parent ae919915f6
commit 64e84a452b

View file

@ -427,7 +427,7 @@ pub fn ArrayHashMap(
/// Set the map to an empty state, making deinitialization a no-op, and /// Set the map to an empty state, making deinitialization a no-op, and
/// returning a copy of the original. /// returning a copy of the original.
pub fn move(self: *Self) Self { pub fn move(self: *Self) Self {
self.pointer_stability.assertUnlocked(); self.unmanaged.pointer_stability.assertUnlocked();
const result = self.*; const result = self.*;
self.unmanaged = .{}; self.unmanaged = .{};
return result; return result;