From 7be4337de96de9948632bdc2fc5067d0c4a76b33 Mon Sep 17 00:00:00 2001 From: Grant Miller Date: Fri, 24 Feb 2023 13:01:41 -0600 Subject: Add `#[must_use]` to all futures --- embassy-futures/src/yield_now.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'embassy-futures') 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 { YieldNowFuture { yielded: false } } +#[must_use = "futures do nothing unless you `.await` or poll them"] struct YieldNowFuture { yielded: bool, } -- cgit