aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2024-03-11 09:13:47 +0100
committerhozan23 <hozan23@proton.me>2024-03-11 09:13:47 +0100
commit53167e975114b7bf60435949a57e5cae820ce503 (patch)
tree170e36097881e5c7b9a8a86d041c18e9b0f2a638
parent6040ab6bd35a47a3c8435c37747b8fcf43c4c7eb (diff)
core: use clone_from instead of dereferencing the waker
-rw-r--r--core/src/async_util/condvar.rs2
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
}