From 7ae72b7a41534a997812c098d09aaaa16aebfaad Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Thu, 21 Mar 2024 22:26:50 +0100 Subject: [PATCH] comment out element triggers --- hui/src/signal/trigger.rs | 52 ++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 25 deletions(-) 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); +// } +// }