Skip to content

Commit

Permalink
mbe: Remove unneeded unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Sep 14, 2022
1 parent d6f0fd0 commit c4a87ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/mbe/src/expander/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ fn match_loop_inner<'t>(
let op = match item.dot.peek() {
None => {
// We are at or past the end of the matcher of `item`.
if item.up.is_some() {
if let Some(up) = &item.up {
if item.sep_parsed.is_none() {
// Get the `up` matcher
let mut new_pos = *item.up.clone().unwrap();
let mut new_pos = (**up).clone();
new_pos.bindings = bindings_builder.copy(&new_pos.bindings);
// Add matches from this repetition to the `matches` of `up`
bindings_builder.push_nested(&mut new_pos.bindings, &item.bindings);
Expand Down

0 comments on commit c4a87ee

Please sign in to comment.