From 53167e975114b7bf60435949a57e5cae820ce503 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Mon, 11 Mar 2024 09:13:47 +0100 Subject: core: use clone_from instead of dereferencing the waker --- core/src/async_util/condvar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- cgit v1.2.3