From 5112d1054cb2c9a7f20ff4694c87881dce61999d Mon Sep 17 00:00:00 2001 From: OscarFdezS Date: Thu, 1 Aug 2024 10:21:14 +0200 Subject: [PATCH] Removed Event trait for core::Default --- src/simulator/std.rs | 45 -------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/simulator/std.rs b/src/simulator/std.rs index 1cc3938..9dbef49 100644 --- a/src/simulator/std.rs +++ b/src/simulator/std.rs @@ -138,51 +138,6 @@ impl MultipleOutputHandler { } } -/* pub trait Event { - type EventInfo; - fn default() -> Self; -} */ - -/// A trait for handling a generic event. -/// -/// The trait is used to define the default behaviour that events must implement. -/// All events must implement this trait since there can be errors in the simulation and a default event must be returned. -/// -/// # Examples -/// -/// ``` -/// pub struct AnyEvent { -/// pub some_type_of_data: (String, String), -/// } -/// -/// impl Event for AnyEvent { -/// fn default() -> Self { -/// AnyEvent { -/// some_type_of_data: ("".to_string(), "".to_string()), -/// } -/// } -/// } -/// ``` -pub trait Event { - /// Creates a default instance of the event. - /// - /// # Examples - /// - /// ``` - /// struct MyEvent; - /// - /// impl Event for MyEvent { - /// - /// fn default() -> Self { - /// MyEvent - /// } - /// } - /// - /// let event = MyEvent::default(); - /// ``` - fn default() -> Self; -} - /// A framework for adding Input Handlers and reducing the complexity of their use. /// /// This struct manages input handlers by spawning threads for each handler and managing the communication