Skip to content

Commit c4a87ee

Browse files
committed
mbe: Remove unneeded unwrap
1 parent d6f0fd0 commit c4a87ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/mbe/src/expander/matcher.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,10 @@ fn match_loop_inner<'t>(
377377
let op = match item.dot.peek() {
378378
None => {
379379
// We are at or past the end of the matcher of `item`.
380-
if item.up.is_some() {
380+
if let Some(up) = &item.up {
381381
if item.sep_parsed.is_none() {
382382
// Get the `up` matcher
383-
let mut new_pos = *item.up.clone().unwrap();
383+
let mut new_pos = (**up).clone();
384384
new_pos.bindings = bindings_builder.copy(&new_pos.bindings);
385385
// Add matches from this repetition to the `matches` of `up`
386386
bindings_builder.push_nested(&mut new_pos.bindings, &item.bindings);

0 commit comments

Comments
 (0)