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

@ -24,6 +24,7 @@ pub fn yield_now() -> impl Future<Output = ()> {
YieldNowFuture { yielded: false }
}
#[must_use = "futures do nothing unless you `.await` or poll them"]
struct YieldNowFuture {
yielded: bool,
}