diff options
| author | 2022-08-16 09:19:33 +0200 | |
|---|---|---|
| committer | 2022-08-16 09:19:33 +0200 | |
| commit | 1ca77f60626666fba792db407dd11ea9b597d9cf (patch) | |
| tree | 0e5ea52e457474899ad5f0076bbe658e67626925 /src/map.hff | |
| parent | 04c7892134d49f3b295a51cc741affe9f02e374d (diff) | |
binary operators and more stuff
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 { |