Skip to content

Commit 0dac2f0

Browse files
authored
Merge pull request rust-lang#4594 from RalfJung/clippy
fix clippy warning: use if let
2 parents 7af6e59 + 7506352 commit 0dac2f0

File tree

1 file changed

+2
-2
lines changed
  • src/tools/miri/src/concurrency

1 file changed

+2
-2
lines changed

src/tools/miri/src/concurrency/sync.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
381381
// We need to drop our mutex borrow before unblock_thread
382382
// because it will be borrowed again in the unblock callback.
383383
drop(mutex);
384-
if thread_id.is_some() {
385-
this.unblock_thread(thread_id.unwrap(), BlockReason::Mutex)?;
384+
if let Some(thread_id) = thread_id {
385+
this.unblock_thread(thread_id, BlockReason::Mutex)?;
386386
}
387387
}
388388
Some(old_lock_count)

0 commit comments

Comments
 (0)