From d4233f6b84e6dedc836124a62c494b33d5a2ed6b Mon Sep 17 00:00:00 2001 From: Alice Ferrazzi Date: Fri, 30 Sep 2022 18:13:05 +0900 Subject: [PATCH] rust: kernel: workqueue: deref on an immutable reference clippy error: if you would like to reborrow, try removing `&*`: `self` Signed-off-by: Alice Ferrazzi Reviewed-by: Luca Barbato --- rust/kernel/workqueue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index c6b89f13746901..823ddf30d42d2b 100644 --- a/rust/kernel/workqueue.rs +++ b/rust/kernel/workqueue.rs @@ -391,7 +391,7 @@ impl Work { // SAFETY: When the work was queued, a call to `into_raw` was made. We just canceled // the work without it having the chance to run, so we need to explicitly destroy this // reference (which would have happened in `work_func` if it did run). - unsafe { Ref::from_raw(&*self) }; + unsafe { Ref::from_raw(self) }; } }