Skip to content

Commit 4b523fc

Browse files
committed
Resolve clippy::unnecessary_mut_passed
error: the method `validate_lock_acquire` doesn't need a mutable reference --> src/sync.rs:477:49 | 477 | data_race.validate_lock_acquire(&mut condvar.data_race, waiter.thread); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D clippy::unnecessary-mut-passed` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
1 parent 1986f90 commit 4b523fc

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
clippy::needless_lifetimes,
2222
clippy::new_without_default,
2323
clippy::single_match,
24-
clippy::unnecessary_mut_passed,
2524
clippy::useless_conversion,
2625
clippy::useless_format
2726
)]

src/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
474474
}
475475
condvar.waiters.pop_front().map(|waiter| {
476476
if let Some(data_race) = data_race {
477-
data_race.validate_lock_acquire(&mut condvar.data_race, waiter.thread);
477+
data_race.validate_lock_acquire(&condvar.data_race, waiter.thread);
478478
}
479479
(waiter.thread, waiter.mutex)
480480
})

0 commit comments

Comments
 (0)