diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2025-05-28 20:45:36 +0200 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2025-06-08 09:10:01 +0000 |
| commit | 8c9770db0c8b2ba08df5c26fb719ba82a74c3ee7 (patch) | |
| tree | 616e6274113c034f71ec69159ef24cf25766fee6 | |
| parent | af871941d3af1225471cb5ed4ee497622e65be55 (diff) | |
Clippy: 1.86: Handle style lint for Option.replace
https://rust-lang.github.io/rust-clippy/stable/index.html#mem_replace_option_with_some
| -rw-r--r-- | rtic-common/src/waker_registration.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rtic-common/src/waker_registration.rs b/rtic-common/src/waker_registration.rs index 46c8818..562eef3 100644 --- a/rtic-common/src/waker_registration.rs +++ b/rtic-common/src/waker_registration.rs @@ -35,8 +35,7 @@ impl CriticalSectionWakerRegistration { Some(ref w2) if (w2.will_wake(new_waker)) => {} _ => { // clone the new waker and store it - if let Some(old_waker) = core::mem::replace(self_waker, Some(new_waker.clone())) - { + if let Some(old_waker) = self_waker.replace(new_waker.clone()) { // We had a waker registered for another task. Wake it, so the other task can // reregister itself if it's still interested. // |
