Skip to content

Commit

Permalink
update wenbo-s review
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed May 31, 2019
1 parent 620306e commit af4caf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trie/slimtrie.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func newSlimTrie(e encode.Encoder, keys []string, values interface{}) (*SlimTrie
leavesi := make([]int32, 0, n)
leavesv := make([]interface{}, 0, n)

queue := make([]subset, 0, n)
queue := make([]subset, 0, n*2)
queue = append(queue, subset{0, n, 0})

for i := 0; i < len(queue); i++ {
Expand Down Expand Up @@ -177,7 +177,7 @@ func newSlimTrie(e encode.Encoder, keys []string, values interface{}) (*SlimTrie

// Continue looking for the first key not starting with label
var j int
for j = s; j < e; j++ {
for j = s + 1; j < e; j++ {
word := bw4.Get(keys[j], prefI)
if word != label {
break
Expand Down

0 comments on commit af4caf0

Please sign in to comment.