Skip to content

Commit

Permalink
pat: add prefix pattern
Browse files Browse the repository at this point in the history
fixes: #62
Signed-off-by: Tim Bray <[email protected]>
  • Loading branch information
timbray committed Jan 31, 2023
1 parent efa114a commit 3f22f7e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions value_matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ func (m *valueMatcher) addTransition(val typedVal) *fieldMatcher {
newDfa = nfa2Dfa(newNfa)
case prefixType:
newDfa, nextField = makePrefixAutomaton(valBytes, nil)
default:
panic("unknown value type")
}
fields.startDfa = mergeDfas(fields.startDfa, newDfa)
m.update(fields)
Expand Down Expand Up @@ -153,9 +151,6 @@ func (m *valueMatcher) addTransition(val typedVal) *fieldMatcher {
fields.startDfa = newAutomaton
m.update(fields)
return nextField

default:
panic("unknown value type")
}
}

Expand All @@ -182,8 +177,6 @@ func (m *valueMatcher) addTransition(val typedVal) *fieldMatcher {
newDfa = nfa2Dfa(newNfa)
case prefixType:
newDfa, nextField = makePrefixAutomaton(valBytes, nil)
default:
panic("unknown val type")
}

// now table is ready for use, nuke singleton to signal threads to use it
Expand Down

0 comments on commit 3f22f7e

Please sign in to comment.