diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-02-24 19:20:32 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-24 19:20:32 +0000 |
| commit | 64247ae456edbbf49b3ab096278d77da2782cca7 (patch) | |
| tree | ad08ac1de1774914dff63b4b23ad0efd8f9b3da6 /embassy-time/src/timer.rs | |
| parent | 2209bef4f22bf77d9d52cda0a0ea40485cc2747a (diff) | |
| parent | 7be4337de96de9948632bdc2fc5067d0c4a76b33 (diff) | |
Merge #1236
1236: Add `#[must_use]` to all futures r=Dirbaio a=GrantM11235
I think that's all of them, I just grep'd for `impl.* Future for`
Co-authored-by: Grant Miller <[email protected]>
Diffstat (limited to 'embassy-time/src/timer.rs')
| -rw-r--r-- | embassy-time/src/timer.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-time/src/timer.rs b/embassy-time/src/timer.rs index bd791b817..f74b5cb24 100644 --- a/embassy-time/src/timer.rs +++ b/embassy-time/src/timer.rs | |||
| @@ -26,6 +26,7 @@ pub async fn with_timeout<F: Future>(timeout: Duration, fut: F) -> Result<F::Out | |||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | /// A future that completes at a specified [Instant](struct.Instant.html). | 28 | /// A future that completes at a specified [Instant](struct.Instant.html). |
| 29 | #[must_use = "futures do nothing unless you `.await` or poll them"] | ||
| 29 | pub struct Timer { | 30 | pub struct Timer { |
| 30 | expires_at: Instant, | 31 | expires_at: Instant, |
| 31 | yielded_once: bool, | 32 | yielded_once: bool, |
