diff --git a/pmap.go b/pmap.go index 3785b9e..7510237 100644 --- a/pmap.go +++ b/pmap.go @@ -11,8 +11,8 @@ const ( nodeMask = 0b1111 ) -type Key = interface{} -type Value = interface{} +type Key = int +type Value = int type Map interface { Get(Key) (Value, bool) diff --git a/pmap_test.go b/pmap_test.go index 735ca4d..ca96b59 100644 --- a/pmap_test.go +++ b/pmap_test.go @@ -8,7 +8,7 @@ import ( func hash(k Key) uint32 { //u := uint(k.(int))*6364136223846793005 + 1 //return uint32(u >> 32) - u := uint(k.(int)) + u := uint(k) //u := uint(k.(int)) return uint32(u + u>>32) }