task: provide default impl for name()

This commit is contained in:
Victoria Fischer 2024-11-02 15:18:15 +01:00
parent faae4b40c7
commit b6b3376fb4

View File

@ -4,7 +4,9 @@ pub trait Task {
fn tick(&mut self) {} fn tick(&mut self) {}
fn start(&mut self) {} fn start(&mut self) {}
fn stop(&mut self) {} fn stop(&mut self) {}
fn name(&self) -> &'static str; fn name(&self) -> &'static str {
core::any::type_name::<Self>()
}
} }
trait ScheduledState: std::fmt::Debug { trait ScheduledState: std::fmt::Debug {