Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/shortcuts.rs')
| -rw-r--r-- | crates/parser/src/shortcuts.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/parser/src/shortcuts.rs b/crates/parser/src/shortcuts.rs index e14526aa73..7040608a9f 100644 --- a/crates/parser/src/shortcuts.rs +++ b/crates/parser/src/shortcuts.rs @@ -76,8 +76,7 @@ impl<'a> LexedStr<'a> { builder.eat_trivias(); (builder.sink)(StrStep::Exit); } - State::PendingEnter => (), - State::Normal => unreachable!(), + State::PendingEnter | State::Normal => (), } let is_eof = builder.pos == builder.lexed.len(); @@ -101,9 +100,8 @@ enum State { impl Builder<'_, '_> { fn token(&mut self, kind: SyntaxKind, n_tokens: u8) { match mem::replace(&mut self.state, State::Normal) { - State::PendingEnter => unreachable!(), State::PendingExit => (self.sink)(StrStep::Exit), - State::Normal => (), + State::PendingEnter | State::Normal => (), } self.eat_trivias(); self.do_token(kind, n_tokens as usize); |