From 3a4b5fb145a590de9c034cecf2a87f115901f466 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Fri, 31 Mar 2023 20:57:26 +0800 Subject: [PATCH] chore: remove unused field --- component/trie/sskv.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/component/trie/sskv.go b/component/trie/sskv.go index b20e8280..f6008659 100644 --- a/component/trie/sskv.go +++ b/component/trie/sskv.go @@ -108,8 +108,8 @@ func (ss *DomainSet) Has(key string) bool { // go to next level nodeId, bmIdx := 0, 0 type wildcardCursor struct { - nodeId, bmIdx, index int - find bool + bmIdx, index int + find bool } cursor := wildcardCursor{} for i := 0; i < len(key); i++ { @@ -132,7 +132,7 @@ func (ss *DomainSet) Has(key string) bool { bmIdx = nextBmIdx nodeId = nextNodeId i = j - cursor.find=false + cursor.find = false goto RESTART } } @@ -145,10 +145,9 @@ func (ss *DomainSet) Has(key string) bool { } else if ss.labels[bmIdx-nodeId] == wildcardByte { cursor.find = true cursor.bmIdx = bmIdx - cursor.nodeId = nodeId cursor.index = i } else if ss.labels[bmIdx-nodeId] == c { - cursor.find=false + cursor.find = false break } }