diff options
Diffstat (limited to 'src/map.hff')
| -rw-r--r-- | src/map.hff | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map.hff b/src/map.hff index f97ea7e..700c553 100644 --- a/src/map.hff +++ b/src/map.hff @@ -100,8 +100,10 @@ struct Map<K, V, KTraits> { } - fn put(self *Map, key K, val V) void { - *self->get_slot(key) = val; + fn put(self *Map, key K, val V) *V { + let slot = self->get_slot(key); + *slot = val; + return slot; } fn clear(self *Map) void { |