revort unnecessary change

This commit is contained in:
mask-pp 2020-12-04 09:27:40 +08:00
parent ae39f917f0
commit 5ff500023f
2 changed files with 3 additions and 4 deletions

1
.gitignore vendored
View File

@ -5,4 +5,3 @@ count.out
test test
profile.out profile.out
tmp.out tmp.out
.idea

View File

@ -611,7 +611,7 @@ walk: // Outer loop for walking the tree
if rb[0] != 0 { if rb[0] != 0 {
// Old rune not finished // Old rune not finished
idxc := rb[0] idxc := rb[0]
for i, c := range bytesconv.StringToBytes(n.indices) { for i, c := range []byte(n.indices) {
if c == idxc { if c == idxc {
// continue with child node // continue with child node
n = n.children[i] n = n.children[i]
@ -643,7 +643,7 @@ walk: // Outer loop for walking the tree
rb = shiftNRuneBytes(rb, off) rb = shiftNRuneBytes(rb, off)
idxc := rb[0] idxc := rb[0]
for i, c := range bytesconv.StringToBytes(n.indices) { for i, c := range []byte(n.indices) {
// Lowercase matches // Lowercase matches
if c == idxc { if c == idxc {
// must use a recursive approach since both the // must use a recursive approach since both the
@ -665,7 +665,7 @@ walk: // Outer loop for walking the tree
rb = shiftNRuneBytes(rb, off) rb = shiftNRuneBytes(rb, off)
idxc := rb[0] idxc := rb[0]
for i, c := range bytesconv.StringToBytes(n.indices) { for i, c := range []byte(n.indices) {
// Uppercase matches // Uppercase matches
if c == idxc { if c == idxc {
// Continue with child node // Continue with child node