From a67e1d12db8de13a514585a50e8ec0198d104e81 Mon Sep 17 00:00:00 2001 From: magical Date: Sun, 23 Jan 2022 05:37:42 +0000 Subject: [PATCH] remove shift argument from lookup --- pmap.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) {