aboutsummaryrefslogtreecommitdiff
path: root/embassy-time/src/timer.rs
diff options
context:
space:
mode:
authorGrant Miller <[email protected]>2023-02-24 13:01:41 -0600
committerGrant Miller <[email protected]>2023-02-24 13:01:41 -0600
commit7be4337de96de9948632bdc2fc5067d0c4a76b33 (patch)
treead08ac1de1774914dff63b4b23ad0efd8f9b3da6 /embassy-time/src/timer.rs
parent2209bef4f22bf77d9d52cda0a0ea40485cc2747a (diff)
Add `#[must_use]` to all futures
Diffstat (limited to 'embassy-time/src/timer.rs')
-rw-r--r--embassy-time/src/timer.rs1
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"]
29pub struct Timer { 30pub struct Timer {
30 expires_at: Instant, 31 expires_at: Instant,
31 yielded_once: bool, 32 yielded_once: bool,