From 545e83d4bbc369f95a1fdd698a0b2230b474ec34 Mon Sep 17 00:00:00 2001 From: Tony Holdstock-Brown Date: Wed, 6 Nov 2024 03:53:16 -0800 Subject: [PATCH] remove unused atomic --- engine_stringmap.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/engine_stringmap.go b/engine_stringmap.go index 62a557d..00fe359 100644 --- a/engine_stringmap.go +++ b/engine_stringmap.go @@ -5,7 +5,6 @@ import ( "fmt" "strconv" "sync" - "sync/atomic" "github.com/cespare/xxhash/v2" "github.com/google/cel-go/common/operators" @@ -51,8 +50,7 @@ type stringLookup struct { // which is then mapped to expression parts. // // this lets us quickly map neq in a fast manner - inequality inequalityMap - inequalityLen int64 + inequality inequalityMap } func (s stringLookup) Type() EngineType { @@ -206,8 +204,6 @@ func (n *stringLookup) Add(ctx context.Context, p ExpressionPart) error { defer n.lock.Unlock() val := n.hash(p.Predicate.LiteralAsString()) - atomic.AddInt64(&n.inequalityLen, 1) - // First, add the variable to inequality if _, ok := n.inequality[p.Predicate.Ident]; !ok { n.inequality[p.Predicate.Ident] = variableMap{}