From b6b3376fb430e2b64c8fff5c87f5574cdd199759 Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Sat, 2 Nov 2024 15:18:15 +0100 Subject: [PATCH] task: provide default impl for name() --- src/task.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/task.rs b/src/task.rs index 7f2ac7d..8f54d87 100644 --- a/src/task.rs +++ b/src/task.rs @@ -4,7 +4,9 @@ pub trait Task { fn tick(&mut self) {} fn start(&mut self) {} fn stop(&mut self) {} - fn name(&self) -> &'static str; + fn name(&self) -> &'static str { + core::any::type_name::() + } } trait ScheduledState: std::fmt::Debug {