RS.CLIPPY.WAKER_CLONE_WAKE

Cloning a `Waker` only to wake it

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: waker_clone_wake. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for usage of waker.clone().wake()

Why is this bad?

Cloning the waker is not necessary, wake_by_ref() enables the same operation without extra cloning/dropping.

Example

waker.clone().wake();

Should be written

waker.wake_by_ref();