sync: add #[must_use] to Notified (#6828)

This commit is contained in:
Sylwester Rąpała 2024-09-06 09:03:27 +02:00 committed by GitHub
parent bd4ccae184
commit 5dcc848fc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -379,6 +379,7 @@ impl Drop for NotifyWaitersList<'_> {
/// This future is fused, so once it has completed, any future calls to poll
/// will immediately return `Poll::Ready`.
#[derive(Debug)]
#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Notified<'a> {
/// The `Notify` being received on.
notify: &'a Notify,