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,