about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-09-19 10:41:56 +0200
committerRalf Jung <post@ralfj.de>2025-09-19 10:41:56 +0200
commit7506352af077b316c12be32e0f9782a0cfd73b1d (patch)
tree3f537b39fbd3eb6202149441d67e82aee36cf55c /src
parent7af6e590a4d1f66770b49698bd01d88cca98f18f (diff)
downloadrust-7506352af077b316c12be32e0f9782a0cfd73b1d.tar.gz
rust-7506352af077b316c12be32e0f9782a0cfd73b1d.zip
fix clippy warning
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/src/concurrency/sync.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/miri/src/concurrency/sync.rs b/src/tools/miri/src/concurrency/sync.rs
index 15d486c27e3..e4e7fb1d725 100644
--- a/src/tools/miri/src/concurrency/sync.rs
+++ b/src/tools/miri/src/concurrency/sync.rs
@@ -381,8 +381,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
                 // We need to drop our mutex borrow before unblock_thread
                 // because it will be borrowed again in the unblock callback.
                 drop(mutex);
-                if thread_id.is_some() {
-                    this.unblock_thread(thread_id.unwrap(), BlockReason::Mutex)?;
+                if let Some(thread_id) = thread_id {
+                    this.unblock_thread(thread_id, BlockReason::Mutex)?;
                 }
             }
             Some(old_lock_count)