authorgravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2019-12-07 13:22:23-05:00
committergravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2019-12-07 13:22:23-05:00
log05fc4d34a93d1e8fd4a107cb17c9d4fd7ffc29bc
tree335a29b37ba374c1f3e25dea35f96ffe8ea0b8e7
parentedebe0586bd0cb73ef8492fd569e1c2fc7aca05b

documentation for mutable HashMap KV pointers


1 files changed, 5 insertions(+), 0 deletions(-)

lib/std/hash_map.zig+5
......@@ -42,6 +42,11 @@ pub fn HashMap(comptime K: type, comptime V: type, comptime hash: fn (key: K) u3
4242
4343 const Self = @This();
4444
45 /// A *KV is a mutable pointer into this HashMap's internal storage.
46 /// Modifying the key is undefined behavior.
47 /// Modifying the value is harmless.
48 /// *KV pointers become invalid whenever this HashMap is modified,
49 /// and then any access to the *KV is undefined behavior.
4550 pub const KV = struct {
4651 key: K,
4752 value: V,