aboutsummaryrefslogtreecommitdiff
path: root/src/map.hff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-16 09:19:33 +0200
committerlemon <lsof@mailbox.org>2022-08-16 09:19:33 +0200
commit1ca77f60626666fba792db407dd11ea9b597d9cf (patch)
tree0e5ea52e457474899ad5f0076bbe658e67626925 /src/map.hff
parent04c7892134d49f3b295a51cc741affe9f02e374d (diff)
binary operators and more stuff
Diffstat (limited to 'src/map.hff')
-rw-r--r--src/map.hff6
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 {