diff --git a/pmap.go b/pmap.go index e318f45..9f7183d 100644 --- a/pmap.go +++ b/pmap.go @@ -67,7 +67,7 @@ func (p pmap) Len() int { func (p pmap) Get(k Key) (Value, bool) { var zero Value h := p.hash(k) - return lookup(p.root, 0, h, k, zero) + return lookup(p.root, h, k, zero) } func (p pmap) Set(k Key, v Value) Map { @@ -112,7 +112,8 @@ func (n collision) getNode(hash uint32, key Key) interface{} { return nil } -func lookup(root interface{}, shift, hash uint32, key Key, zero Value) (Value, bool) { +func lookup(root interface{}, hash uint32, key Key, zero Value) (Value, bool) { + shift := 0 cur := root for { switch n := cur.(type) {