aboutsummaryrefslogtreecommitdiff
path: root/rtic-common
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-common')
-rw-r--r--rtic-common/src/waker_registration.rs3
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.
//