authorgravatar for vaccaro.andrea45@gmail.comAndrea Vaccaro <vaccaro.andrea45@gmail.com> 2026-10-11 12:34:25+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-12 11:16:34+02:00
log7aadd325d1efad3c6222a91c354d92994a7bf76e
tree571875c1fa31a3fa748df3c58da207c50ddc3eb1
parent40fd34fe7bd7b5c3fdbc2804f7b39bdf02d09aff

value from ptr is never modified


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/hash_map.zig+2-2
......@@ -434,7 +434,7 @@ pub fn HashMap(
434434 ///
435435 /// TODO: answer the question in these doc comments, does this
436436 /// increase the unused capacity by one?
437 pub fn removeByPtr(self: *Self, key_ptr: *K) void {
437 pub fn removeByPtr(self: *Self, key_ptr: *const K) void {
438438 self.unmanaged.removeByPtr(key_ptr);
439439 }
440440
......@@ -1269,7 +1269,7 @@ fn Custom(
12691269 ///
12701270 /// TODO: answer the question in these doc comments, does this
12711271 /// increase the unused capacity by one?
1272 pub fn removeByPtr(self: *Self, key_ptr: *K) void {
1272 pub fn removeByPtr(self: *Self, key_ptr: *const K) void {
12731273 // if @sizeOf(K) == 0 then there is at most one item in the hash
12741274 // map, which is assumed to exist as key_ptr must be valid. This
12751275 // item must be at index 0.