From 8c9770db0c8b2ba08df5c26fb719ba82a74c3ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 28 May 2025 20:45:36 +0200 Subject: [PATCH] Clippy: 1.86: Handle style lint for Option.replace https://rust-lang.github.io/rust-clippy/stable/index.html#mem_replace_option_with_some --- rtic-common/src/waker_registration.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rtic-common/src/waker_registration.rs b/rtic-common/src/waker_registration.rs index 46c8818af38..562eef3221f 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. //