diff options
| author | Ralf Jung <post@ralfj.de> | 2025-09-19 09:07:57 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-19 09:07:57 +0000 |
| commit | 0dac2f06fa6f7edc166edf12831902f909ba7207 (patch) | |
| tree | 3f537b39fbd3eb6202149441d67e82aee36cf55c | |
| parent | 7af6e590a4d1f66770b49698bd01d88cca98f18f (diff) | |
| parent | 7506352af077b316c12be32e0f9782a0cfd73b1d (diff) | |
| download | rust-0dac2f06fa6f7edc166edf12831902f909ba7207.tar.gz rust-0dac2f06fa6f7edc166edf12831902f909ba7207.zip | |
Merge pull request #4594 from RalfJung/clippy
fix clippy warning: use if let
| -rw-r--r-- | src/tools/miri/src/concurrency/sync.rs | 4 |
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) |
