From 114f7dfa14530a0197125dfef36d2a385bff5c60 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 19 Sep 2024 23:17:09 +0200 Subject: Add `must_use` attribute to `Task` --- runtime/src/task.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime') 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(Option>>); impl Task { -- cgit