fix(input): wat
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
🪞👃🪞 2025-07-29 22:07:03 +03:00
parent 9f7d0efda5
commit 85c305385b

View file

@ -18,7 +18,7 @@ type EventMapImpl<E, C> = BTreeMap<E, Vec<Binding<C>>>;
pub struct EventMap<E, C>(EventMapImpl<E, C>); pub struct EventMap<E, C>(EventMapImpl<E, C>);
/// An input binding. /// An input binding.
#[derive(Debug)] #[derive(Debug, Clone)]
pub struct Binding<C> { pub struct Binding<C> {
pub command: C, pub command: C,
pub condition: Option<Condition>, pub condition: Option<Condition>,
@ -27,7 +27,8 @@ pub struct Binding<C> {
} }
/// Input bindings are only returned if this evaluates to true /// Input bindings are only returned if this evaluates to true
pub struct Condition(Box<dyn Fn()->bool + Send + Sync>); #[derive(Clone)]
pub struct Condition(Arc<Box<dyn Fn()->bool + Send + Sync>>);
impl_debug!(Condition |self, w| { write!(w, "*") }); impl_debug!(Condition |self, w| { write!(w, "*") });