mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
reflect: use .key() instead of a type assert
This should be ever so slightly more efficient.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user