From 9fc950697d4d5a1f19f3aeb9c0d0097cc97c8bac Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 2 Jul 2023 12:58:07 +0200 Subject: [PATCH] chore: add TaskManager must_use annotation (#3525) --- crates/tasks/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/tasks/src/lib.rs b/crates/tasks/src/lib.rs index 2d045906f..1d27e1477 100644 --- a/crates/tasks/src/lib.rs +++ b/crates/tasks/src/lib.rs @@ -138,6 +138,7 @@ impl TaskSpawner for TokioTaskExecutor { /// diagnostic purposes, since tokio task essentially fail silently. Therefore, this type is a /// Stream that yields the name of panicked task, See [`TaskExecutor::spawn_critical`]. In order to /// execute Tasks use the [`TaskExecutor`] type [`TaskManager::executor`]. +#[must_use = "TaskManager must be polled to monitor critical tasks"] pub struct TaskManager { /// Handle to the tokio runtime this task manager is associated with. ///