dsl: auto-impl the obvious one (hopefully)
Some checks are pending
/ build (push) Waiting to run

re foreign trait constraints
This commit is contained in:
🪞👃🪞 2025-05-23 21:47:18 +03:00
parent ddf0c05d5f
commit cbd28a5934
10 changed files with 30 additions and 24 deletions

View file

@ -22,7 +22,7 @@ impl<'k, S, C: Take<'k, S> + Command<S>, I: DslInput> KeyMap<'k, S, C, I> for So
match exp_iter.next() {
Some(Token { value: Value::Sym(binding), .. }) => {
if input.matches_dsl(binding) {
if let Some(command) = Take::provide(state, &mut exp_iter)? {
if let Some(command) = Take::take(state, &mut exp_iter)? {
return Ok(Some(command))
}
}
@ -48,7 +48,7 @@ impl<'k, S, C: Take<'k, S> + Command<S>, I: DslInput> KeyMap<'k, S, C, I> for To
match e.next() {
Some(Token { value: Value::Sym(binding), .. }) => {
if input.matches_dsl(binding) {
if let Some(command) = Take::provide(state, &mut e)? {
if let Some(command) = Take::take(state, &mut e)? {
return Ok(Some(command))
}
}