diff --git a/util.d b/util.d index fc02847..b4aa788 100644 --- a/util.d +++ b/util.d @@ -377,7 +377,7 @@ Push(K, V)(HashTable!(K, V)* ht, K key, V value) if (ht.free_lists.first != ht.nil) { - node = Pop(&ht.free_lists, ht.nil); + node = SLLPop(&ht.free_lists, ht.nil); } else { @@ -388,7 +388,7 @@ Push(K, V)(HashTable!(K, V)* ht, K key, V value) node.value.key = key; node.value.value = value; - Push(GetList(ht, key), node, ht.nil); + SLLPush(GetList(ht, key), node, ht.nil); ht.node_count += 1; @@ -928,4 +928,10 @@ unittest assert(test_bytes[0 .. 96] == bytes[0 .. 96]); } + + { // Hash Table + auto table = CreateHashTable!(u64, u64)(10); + + table[100] = 100; + } }