Skip to content

Commit dc45a10

Browse files
authored
lexicon: replace loop with values = append(values, ids...) (#102)
1 parent 7b99cb2 commit dc45a10

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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)