on master help sign in
Avoid unnecessary clone when formatting error (#1903)
85c23b3jeepee
helix-term/src/commands.rs+2−5
@@ -1646,11 +1646,8 @@ fn search_next_or_prev_impl(cx: &mut Context, movement: Movement, direction: Dir
1646 wrap_around,
1646 wrap_around,
1647 );
1647 );
1648 } else {
1648 } else {
1649− // get around warning `mutable_borrow_reservation_conflict`
1650− // which will be a hard error in the future
1651− // see: https://github.com/rust-lang/rust/issues/59159
1652− let query = query.clone();
1653− cx.editor.set_error(format!("Invalid regex: {}", query));
1649+ let error = format!("Invalid regex: {}", query);
1650+ cx.editor.set_error(error);
1654 }
1651 }
1655 }
1652 }
1656}
1653}