Add #[must_use] to all futures

This commit is contained in:
Grant Miller
2023-02-24 13:01:41 -06:00
parent 2209bef4f2
commit 7be4337de9
10 changed files with 16 additions and 0 deletions

View File

@ -26,6 +26,7 @@ pub async fn with_timeout<F: Future>(timeout: Duration, fut: F) -> Result<F::Out
}
/// A future that completes at a specified [Instant](struct.Instant.html).
#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Timer {
expires_at: Instant,
yielded_once: bool,