From 326b1666862d094bd9e82c46b81f3e77426c20e0 Mon Sep 17 00:00:00 2001 From: i do not exist Date: Mon, 5 Oct 2026 16:02:26 +0300 Subject: [PATCH] Binding::new; relax ::default --- src/conf/bind.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/conf/bind.rs b/src/conf/bind.rs index d15c47ca..3299f871 100644 --- a/src/conf/bind.rs +++ b/src/conf/bind.rs @@ -173,10 +173,10 @@ impl Bind { pub source: Option>, } -impl Default for Binding { - fn default () -> Self { +impl Binding { + pub fn new (commands: Arc<[C]>) -> Self { Self { - commands: Default::default(), + commands, condition: Default::default(), description: Default::default(), source: Default::default(), @@ -184,6 +184,12 @@ impl Default for Binding { } } +impl Default for Binding { + fn default () -> Self { + Self::new([].into()) + } +} + /// Condition that must evaluate to true in order to enable an input binding. /// /// ```