diff options
Diffstat (limited to '')
-rw-r--r-- | futures/src/command.rs | 1 | ||||
-rw-r--r-- | futures/src/subscription.rs | 1 | ||||
-rw-r--r-- | native/src/command.rs | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/futures/src/command.rs b/futures/src/command.rs index 05c3a1d0..3d1ec3f9 100644 --- a/futures/src/command.rs +++ b/futures/src/command.rs @@ -1,4 +1,5 @@ /// A set of asynchronous actions to be performed by some runtime. +#[must_use = "`Command` must be returned to runtime to take effect"] #[derive(Debug)] pub struct Command<T>(Internal<T>); diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs index e96fa704..d18ec4f7 100644 --- a/futures/src/subscription.rs +++ b/futures/src/subscription.rs @@ -20,6 +20,7 @@ use crate::BoxStream; /// `Hasher`. /// /// [`Command`]: crate::Command +#[must_use = "`Subscription` must be returned to runtime to take effect"] pub struct Subscription<Hasher, Event, Output> { recipes: Vec<Box<dyn Recipe<Hasher, Event, Output = Output>>>, } diff --git a/native/src/command.rs b/native/src/command.rs index 89ee7375..ca9d0b64 100644 --- a/native/src/command.rs +++ b/native/src/command.rs @@ -11,6 +11,7 @@ use std::fmt; use std::future::Future; /// A set of asynchronous actions to be performed by some runtime. +#[must_use = "`Command` must be returned to runtime to take effect"] pub struct Command<T>(iced_futures::Command<Action<T>>); impl<T> Command<T> { |