aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-sync')
-rw-r--r--embassy-sync/src/channel.rs4
-rw-r--r--embassy-sync/src/pipe.rs2
2 files changed, 6 insertions, 0 deletions
diff --git a/embassy-sync/src/channel.rs b/embassy-sync/src/channel.rs
index 76f42d0e7..77352874d 100644
--- a/embassy-sync/src/channel.rs
+++ b/embassy-sync/src/channel.rs
@@ -181,6 +181,7 @@ where
181} 181}
182 182
183/// Future returned by [`Channel::recv`] and [`Receiver::recv`]. 183/// Future returned by [`Channel::recv`] and [`Receiver::recv`].
184#[must_use = "futures do nothing unless you `.await` or poll them"]
184pub struct RecvFuture<'ch, M, T, const N: usize> 185pub struct RecvFuture<'ch, M, T, const N: usize>
185where 186where
186 M: RawMutex, 187 M: RawMutex,
@@ -203,6 +204,7 @@ where
203} 204}
204 205
205/// Future returned by [`DynamicReceiver::recv`]. 206/// Future returned by [`DynamicReceiver::recv`].
207#[must_use = "futures do nothing unless you `.await` or poll them"]
206pub struct DynamicRecvFuture<'ch, T> { 208pub struct DynamicRecvFuture<'ch, T> {
207 channel: &'ch dyn DynamicChannel<T>, 209 channel: &'ch dyn DynamicChannel<T>,
208} 210}
@@ -219,6 +221,7 @@ impl<'ch, T> Future for DynamicRecvFuture<'ch, T> {
219} 221}
220 222
221/// Future returned by [`Channel::send`] and [`Sender::send`]. 223/// Future returned by [`Channel::send`] and [`Sender::send`].
224#[must_use = "futures do nothing unless you `.await` or poll them"]
222pub struct SendFuture<'ch, M, T, const N: usize> 225pub struct SendFuture<'ch, M, T, const N: usize>
223where 226where
224 M: RawMutex, 227 M: RawMutex,
@@ -250,6 +253,7 @@ where
250impl<'ch, M, T, const N: usize> Unpin for SendFuture<'ch, M, T, N> where M: RawMutex {} 253impl<'ch, M, T, const N: usize> Unpin for SendFuture<'ch, M, T, N> where M: RawMutex {}
251 254
252/// Future returned by [`DynamicSender::send`]. 255/// Future returned by [`DynamicSender::send`].
256#[must_use = "futures do nothing unless you `.await` or poll them"]
253pub struct DynamicSendFuture<'ch, T> { 257pub struct DynamicSendFuture<'ch, T> {
254 channel: &'ch dyn DynamicChannel<T>, 258 channel: &'ch dyn DynamicChannel<T>,
255 message: Option<T>, 259 message: Option<T>,
diff --git a/embassy-sync/src/pipe.rs b/embassy-sync/src/pipe.rs
index 905686acd..1977005fb 100644
--- a/embassy-sync/src/pipe.rs
+++ b/embassy-sync/src/pipe.rs
@@ -48,6 +48,7 @@ where
48} 48}
49 49
50/// Future returned by [`Pipe::write`] and [`Writer::write`]. 50/// Future returned by [`Pipe::write`] and [`Writer::write`].
51#[must_use = "futures do nothing unless you `.await` or poll them"]
51pub struct WriteFuture<'p, M, const N: usize> 52pub struct WriteFuture<'p, M, const N: usize>
52where 53where
53 M: RawMutex, 54 M: RawMutex,
@@ -110,6 +111,7 @@ where
110} 111}
111 112
112/// Future returned by [`Pipe::read`] and [`Reader::read`]. 113/// Future returned by [`Pipe::read`] and [`Reader::read`].
114#[must_use = "futures do nothing unless you `.await` or poll them"]
113pub struct ReadFuture<'p, M, const N: usize> 115pub struct ReadFuture<'p, M, const N: usize>
114where 116where
115 M: RawMutex, 117 M: RawMutex,