Minor fixes.

This commit is contained in:
Christoffer Lerno
2022-10-01 22:14:07 +02:00
parent 55f7046da8
commit f05ffc84d8
5 changed files with 15 additions and 5 deletions

View File

@@ -50,6 +50,7 @@ fn bool HashMap.is_empty(HashMap* map) @inline
fn Value*! HashMap.get_ref(HashMap* map, Key key)
{
if (!map.count) return SearchResult.MISSING!;
uint hash = rehash(key.hash());
for (Entry *e = map.table[index_for(hash, map.table.len)]; e != null; e = e.next)
{