mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 12:55:23 +01:00
Clippy: 1.86: Handle style lint for Option.replace
https://rust-lang.github.io/rust-clippy/stable/index.html#mem_replace_option_with_some
This commit is contained in:
parent
af871941d3
commit
8c9770db0c
1 changed files with 1 additions and 2 deletions
|
|
@ -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.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue