src/runtime: remove extra if check in hashmap set logic

This commit is contained in:
Damian Gryski
2022-04-07 17:14:57 -07:00
committed by Ron Evans
parent 93654544b3
commit 8b360ec911
-6
View File
@@ -153,12 +153,6 @@ func hashmapLenUnsafePointer(p unsafe.Pointer) int {
func hashmapSet(m *hashmap, key unsafe.Pointer, value unsafe.Pointer, hash uint32) {
tophash := hashmapTopHash(hash)
if m.buckets == nil {
// No bucket was allocated yet, do so now.
m.buckets = unsafe.Pointer(hashmapInsertIntoNewBucket(m, key, value, tophash))
return
}
if hashmapShouldGrow(m) {
hashmapGrow(m)
}