diff --git a/hui/src/signal/trigger.rs b/hui/src/signal/trigger.rs index c5d3b31..5204080 100644 --- a/hui/src/signal/trigger.rs +++ b/hui/src/signal/trigger.rs @@ -1,4 +1,4 @@ -use crate::element::UiElement; +//use crate::element::UiElement; use super::{Signal, SignalStore}; #[allow(clippy::complexity)] @@ -30,32 +30,34 @@ impl SignalTriggerArg { (self.0)(s, x); } } -#[allow(clippy::complexity)] -pub struct SignalTriggerElement(Box); -impl SignalTriggerElement { - pub fn new S + 'static>(f: F) -> Self { - Self(Box::new(move |s: &mut SignalStore, e: &mut E| { - s.add::(f(e)); - })) - } - pub fn fire(&self, s: &mut SignalStore, e: &mut E) { - (self.0)(s, e); - } -} +// #[allow(clippy::complexity)] +// pub struct SignalTriggerElement(Box); -#[allow(clippy::complexity)] -pub struct SignalTriggerElementArg(Box); +// impl SignalTriggerElement { +// pub fn new S + 'static>(f: F) -> Self { +// Self(Box::new(move |s: &mut SignalStore, e: &mut E| { +// s.add::(f(e)); +// })) +// } -impl SignalTriggerElementArg { - pub fn new S + 'static>(f: F) -> Self { - Self(Box::new(move |s: &mut SignalStore, e: &mut E, x| { - s.add::(f(x, e)); - })) - } +// pub fn fire(&self, s: &mut SignalStore, e: &mut E) { +// (self.0)(s, e); +// } +// } - pub fn fire(&self, s: &mut SignalStore, e: &mut E, x: T) { - (self.0)(s, e, x); - } -} +// #[allow(clippy::complexity)] +// pub struct SignalTriggerElementArg(Box); + +// impl SignalTriggerElementArg { +// pub fn new S + 'static>(f: F) -> Self { +// Self(Box::new(move |s: &mut SignalStore, e: &mut E, x| { +// s.add::(f(x, e)); +// })) +// } + +// pub fn fire(&self, s: &mut SignalStore, e: &mut E, x: T) { +// (self.0)(s, e, x); +// } +// }