Skip to content

Commit 934fb6e

Browse files
testwilljmr
authored andcommitted
chore: replace loop with l.values = append(l.values, ids...)
1 parent 0b6e08c commit 934fb6e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: s2/lexicon.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ func (l *sequenceLexicon) add(ids []int32) int32 {
129129
if id, ok := l.idSet[hashSet(ids)]; ok {
130130
return id
131131
}
132-
for _, v := range ids {
133-
l.values = append(l.values, v)
134-
}
132+
l.values = append(l.values, ids...)
135133
l.begins = append(l.begins, uint32(len(l.values)))
136134

137135
id := int32(len(l.begins)) - 2

0 commit comments

Comments
 (0)