diff --git a/runtime/src/task.rs b/runtime/src/task.rs index 756f592b..f6cc961d 100644 --- a/runtime/src/task.rs +++ b/runtime/src/task.rs @@ -17,7 +17,6 @@ pub use sipper::{Never, Sender, Sipper, Straw, sipper, stream}; /// A set of concurrent actions to be performed by the iced runtime. /// /// 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 { stream: Option>>, @@ -278,6 +277,17 @@ impl Task { } } +impl std::fmt::Debug for Task { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "Task<{}>, units={}", + std::any::type_name::(), + self.units + ) + } +} + /// A handle to a [`Task`] that can be used for aborting it. #[derive(Debug, Clone)] pub struct Handle {