diff options
author | 2024-09-19 23:17:09 +0200 | |
---|---|---|
committer | 2024-09-19 23:17:09 +0200 | |
commit | 114f7dfa14530a0197125dfef36d2a385bff5c60 (patch) | |
tree | cabccc9ba9065d60d58d982d0c61709520bc9ab2 /runtime | |
parent | bf3b6f100df7b1585dfac88da432bc29784ed534 (diff) | |
download | iced-114f7dfa14530a0197125dfef36d2a385bff5c60.tar.gz iced-114f7dfa14530a0197125dfef36d2a385bff5c60.tar.bz2 iced-114f7dfa14530a0197125dfef36d2a385bff5c60.zip |
Add `must_use` attribute to `Task`
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/src/task.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/src/task.rs b/runtime/src/task.rs index ec8d7cc7..3f97d134 100644 --- a/runtime/src/task.rs +++ b/runtime/src/task.rs @@ -14,6 +14,7 @@ use std::future::Future; /// /// A [`Task`] _may_ produce a bunch of values of type `T`. #[allow(missing_debug_implementations)] +#[must_use = "`Task` must be returned to the runtime to take effect; normally in your `update` or `new` functions."] pub struct Task<T>(Option<BoxStream<Action<T>>>); impl<T> Task<T> { |