first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use itertools::Either;
|
||||
|
||||
use super::{
|
||||
BindingLens, Context, CustomTag, EditableBinding, EditableBindingLens, FixedBinding, Keymap,
|
||||
Keystroke, Trigger,
|
||||
};
|
||||
use crate::{actions::StandardAction, Action, EntityId};
|
||||
use itertools::Either;
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
use crate::actions::StandardAction;
|
||||
use crate::{Action, EntityId, EntityIdMap};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Matcher {
|
||||
pending: HashMap<EntityId, Pending>,
|
||||
pending: EntityIdMap<Pending>,
|
||||
keymap: Keymap,
|
||||
/// Default binding validator that should run on every binding (irrespective of the [`Context`]
|
||||
/// the binding was registered against).
|
||||
@@ -53,7 +56,7 @@ pub enum MatchResult {
|
||||
impl Matcher {
|
||||
pub fn new(keymap: Keymap) -> Self {
|
||||
Self {
|
||||
pending: HashMap::new(),
|
||||
pending: EntityIdMap::default(),
|
||||
keymap,
|
||||
default_binding_validator: None,
|
||||
binding_validators: vec![],
|
||||
@@ -376,5 +379,5 @@ impl Matcher {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "matcher_test.rs"]
|
||||
#[path = "matcher_tests.rs"]
|
||||
mod tests;
|
||||
|
||||
Reference in New Issue
Block a user