Skip to content

Commit

Permalink
adjust format
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiscode committed Jul 15, 2024
1 parent 24debb2 commit a306de0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl LR1Constraint {
.ok()
.and_then(|s| s.parse().ok())
.and_then(NonZeroUsize::new)
.unwrap_or(NonZeroUsize::new(8192).expect("invalid LRU cache size"));
.unwrap_or(NonZeroUsize::new(8192).unwrap());
let mut cache = LruCache::new(cache_size);
cache.put(state.clone(), (indices.clone(), is_match));
Self {
Expand Down
9 changes: 3 additions & 6 deletions text-utils-grammar/src/lr1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1090,12 +1090,9 @@ impl Constraint for LR1GrammarConstraint {
i += skip;
continue;
};
let Drive::Stack(next_stack) = drive(
&self.grammar,
&self.table,
state.stack.clone(),
&tokens,
) else {
let Drive::Stack(next_stack) =
drive(&self.grammar, &self.table, state.stack.clone(), &tokens)
else {
i += skip;
continue;
};
Expand Down

0 comments on commit a306de0

Please sign in to comment.