reflect: use .key() instead of a type assert

This should be ever so slightly more efficient.
This commit is contained in:
Ayke van Laethem
2023-06-10 15:03:57 +02:00
committed by Ayke
parent 91ee4d0030
commit 0cb5d336f4
+1 -1
View File
@@ -913,7 +913,7 @@ func (v Value) MapKeys() []Value {
k := New(v.typecode.Key())
e := New(v.typecode.Elem())
keyType := v.typecode.Key().(*rawType)
keyType := v.typecode.key()
isKeyStoredAsInterface := keyType.Kind() != String && !keyType.isBinary()
for hashmapNext(v.pointer(), it, k.value, e.value) {