From ca4c558eab46aad27da145381e425908d995a625 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Mon, 14 Jul 2025 23:06:29 +0300 Subject: [PATCH] fix(input): InputMap manual Default impl --- input/src/input_dsl.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/input/src/input_dsl.rs b/input/src/input_dsl.rs index 363efc0..7ac0644 100644 --- a/input/src/input_dsl.rs +++ b/input/src/input_dsl.rs @@ -4,12 +4,17 @@ use crate::*; /// Each contained layer defines a mapping from input event to command invocation /// over a given state. Furthermore, each layer may have an associated cond, /// so that only certain layers are active at a given time depending on state. -#[derive(Debug, Default)] pub struct InputMap( +#[derive(Debug)] pub struct InputMap( /// Map of input event (key combination) to /// all command expressions bound to it by /// all loaded input layers. pub BTreeMap>> ); +impl Default for InputMap { + fn default () -> Self { + Self(Default::default()) + } +} #[derive(Debug, Default)] pub struct InputBinding { condition: Option, command: T,