diff options
| author | Grant Miller <[email protected]> | 2023-02-24 13:01:41 -0600 |
|---|---|---|
| committer | Grant Miller <[email protected]> | 2023-02-24 13:01:41 -0600 |
| commit | 7be4337de96de9948632bdc2fc5067d0c4a76b33 (patch) | |
| tree | ad08ac1de1774914dff63b4b23ad0efd8f9b3da6 /embassy-futures/src | |
| parent | 2209bef4f22bf77d9d52cda0a0ea40485cc2747a (diff) | |
Add `#[must_use]` to all futures
Diffstat (limited to 'embassy-futures/src')
| -rw-r--r-- | embassy-futures/src/yield_now.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-futures/src/yield_now.rs b/embassy-futures/src/yield_now.rs index 13b103778..bb3c67d17 100644 --- a/embassy-futures/src/yield_now.rs +++ b/embassy-futures/src/yield_now.rs | |||
| @@ -24,6 +24,7 @@ pub fn yield_now() -> impl Future<Output = ()> { | |||
| 24 | YieldNowFuture { yielded: false } | 24 | YieldNowFuture { yielded: false } |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | #[must_use = "futures do nothing unless you `.await` or poll them"] | ||
| 27 | struct YieldNowFuture { | 28 | struct YieldNowFuture { |
| 28 | yielded: bool, | 29 | yielded: bool, |
| 29 | } | 30 | } |
