Skip to content

Commit

Permalink
remove unused atomic
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhb committed Nov 6, 2024
1 parent 3ccae49 commit 545e83d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions engine_stringmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"strconv"
"sync"
"sync/atomic"

"github.com/cespare/xxhash/v2"
"github.com/google/cel-go/common/operators"
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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{}
Expand Down

0 comments on commit 545e83d

Please sign in to comment.