Skip to content

Commit

Permalink
chore: use bytes.Equal instead
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill committed Nov 24, 2023
1 parent e045937 commit 321e3ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trie/slimtrie_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ func newToKeep(n int, values [][]byte, opt *Opt) []bool {
if *opt.DedupValue && values != nil {
tokeep[0] = true
for i := 1; i < n; i++ {
tokeep[i] = bytes.Compare(values[i-1], values[i]) != 0
tokeep[i] = !bytes.Equal(values[i-1], values[i])
}
return tokeep
}
Expand Down

0 comments on commit 321e3ff

Please sign in to comment.