Skip to content

Commit 158a3ae

Browse files
jo-gorombrubeck
authored andcommitted
Explains needless mut borrow
1 parent ba12cb5 commit 158a3ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,8 @@ fn not_nan_usage_in_const_context() {
665665
fn not_nan_panic_safety() {
666666
let catch_op = |mut num, op: fn(&mut NotNan<_>)| {
667667
let mut num_ref = panic::AssertUnwindSafe(&mut num);
668-
let _ = panic::catch_unwind(move || op(*num_ref));
668+
#[allow(clippy::needless_borrow)] // mut-borrow needed for msrv 1.36.0
669+
let _ = panic::catch_unwind(move || op(&mut *num_ref));
669670
num
670671
};
671672

0 commit comments

Comments
 (0)