From 5dcc848fc85259e342c032b9084debfcb70aa8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sylwester=20R=C4=85pa=C5=82a?= Date: Fri, 6 Sep 2024 09:03:27 +0200 Subject: [PATCH] sync: add `#[must_use]` to `Notified` (#6828) --- tokio/src/sync/notify.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tokio/src/sync/notify.rs b/tokio/src/sync/notify.rs index d76ff9221..99c442957 100644 --- a/tokio/src/sync/notify.rs +++ b/tokio/src/sync/notify.rs @@ -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,