small cleanup
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 25 Apr 2021 03:59:56 +0000 (22:59 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 25 Apr 2021 03:59:56 +0000 (22:59 -0500)
core/container/map.onyx

index 1153597a351e582ee05abf82ee31387ff217501f..c6be5e4271712fb7dac3b1359fe6c6984e68b5f9 100644 (file)
@@ -45,12 +45,11 @@ put :: (use map: ^Map($K, $V), key: K, value: V) {
         return;
     }
 
-    entry : Map.Entry(K, V);
-    entry.key = key;
-    entry.value = value;
-    entry.next = hashes[lr.hash_index];
-
-    array.push(^entries, entry);
+    array.push(^entries, .{
+        key = key,
+        value = value,
+        hashes[lr.hash_index],
+    });
 
     hashes[lr.hash_index] = entries.count - 1;
 }