Skip to content

Commit

Permalink
dfa: remove some redundant branches
Browse files Browse the repository at this point in the history
I discovered these while reviewing the code to prep for the rewrite
in regex-automata.
  • Loading branch information
BurntSushi committed Jun 26, 2021
1 parent 6cdb904 commit fce37e4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/dfa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,6 @@ impl<'a> Fsm<'a> {
match self.cache.trans.next(si, self.byte_class(b)) {
STATE_UNKNOWN => self.exec_byte(qcur, qnext, si, b),
STATE_QUIT => None,
STATE_DEAD => Some(STATE_DEAD),
nsi => Some(nsi),
}
}
Expand Down Expand Up @@ -1387,7 +1386,6 @@ impl<'a> Fsm<'a> {
};
match self.cache.start_states[flagi] {
STATE_UNKNOWN => {}
STATE_DEAD => return Some(STATE_DEAD),
si => return Some(si),
}
q.clear();
Expand Down

0 comments on commit fce37e4

Please sign in to comment.