diff options
author | hozan23 <hozan23@proton.me> | 2024-03-11 09:13:47 +0100 |
---|---|---|
committer | hozan23 <hozan23@proton.me> | 2024-03-11 09:13:47 +0100 |
commit | 53167e975114b7bf60435949a57e5cae820ce503 (patch) | |
tree | 170e36097881e5c7b9a8a86d041c18e9b0f2a638 /core | |
parent | 6040ab6bd35a47a3c8435c37747b8fcf43c4c7eb (diff) |
core: use clone_from instead of dereferencing the waker
Diffstat (limited to 'core')
-rw-r--r-- | core/src/async_util/condvar.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/async_util/condvar.rs b/core/src/async_util/condvar.rs index 73e76fc..d3bc15b 100644 --- a/core/src/async_util/condvar.rs +++ b/core/src/async_util/condvar.rs @@ -135,7 +135,7 @@ impl<'a, T> Future for CondVarAwait<'a, T> { Some(wk) => { // This will prevent cloning again if !wk.will_wake(cx.waker()) { - *wk = cx.waker().clone(); + wk.clone_from(cx.waker()); } Poll::Pending } |