mirror of
https://github.com/ziglang/zig.git
synced 2025-12-07 14:53:08 +00:00
std.ArrayHashMap: unmanaged holds the pointer stability lock
This commit is contained in:
parent
ae919915f6
commit
64e84a452b
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user