mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 21:05:35 +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)) => {}
|
Some(ref w2) if (w2.will_wake(new_waker)) => {}
|
||||||
_ => {
|
_ => {
|
||||||
// clone the new waker and store it
|
// 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
|
// We had a waker registered for another task. Wake it, so the other task can
|
||||||
// reregister itself if it's still interested.
|
// reregister itself if it's still interested.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue