Add must_use attribute to Task
This commit is contained in:
parent
bf3b6f100d
commit
114f7dfa14
2 changed files with 2 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ pub type Hasher = rustc_hash::FxHasher;
|
|||
/// ```
|
||||
///
|
||||
/// [`Future`]: std::future::Future
|
||||
#[must_use = "`Subscription` must be returned to runtime to take effect"]
|
||||
#[must_use = "`Subscription` must be returned to the runtime to take effect; normally in your `subscription` function."]
|
||||
pub struct Subscription<T> {
|
||||
recipes: Vec<Box<dyn Recipe<Output = T>>>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue