mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-10-08 18:56:42 +02:00
Binding::new; relax ::default
This commit is contained in:
parent
8c4419e6f5
commit
326b166686
1 changed files with 9 additions and 3 deletions
|
|
@ -173,10 +173,10 @@ impl<E: Clone + Ord, C> Bind<E, C> {
|
||||||
pub source: Option<Arc<PathBuf>>,
|
pub source: Option<Arc<PathBuf>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: Default> Default for Binding<C> {
|
impl<C> Binding<C> {
|
||||||
fn default () -> Self {
|
pub fn new (commands: Arc<[C]>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
commands: Default::default(),
|
commands,
|
||||||
condition: Default::default(),
|
condition: Default::default(),
|
||||||
description: Default::default(),
|
description: Default::default(),
|
||||||
source: Default::default(),
|
source: Default::default(),
|
||||||
|
|
@ -184,6 +184,12 @@ impl<C: Default> Default for Binding<C> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<C> Default for Binding<C> {
|
||||||
|
fn default () -> Self {
|
||||||
|
Self::new([].into())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Condition that must evaluate to true in order to enable an input binding.
|
/// Condition that must evaluate to true in order to enable an input binding.
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue