diff --git a/input/src/input_dsl.rs b/input/src/input_dsl.rs index cde5a15..4575e24 100644 --- a/input/src/input_dsl.rs +++ b/input/src/input_dsl.rs @@ -51,19 +51,19 @@ impl<'state, S, C: DslCommand<'state, S>, I: DslInput> KeyMap<'state, S, C, I> f while let Some(next) = iter.next() { match next { Token { value: Value::Exp(0, exp_iter), .. } => { - let mut exp_iter = exp_iter.clone(); - match exp_iter.next() { + let mut e = exp_iter.clone(); + match e.next() { Some(Token { value: Value::Sym(binding), .. }) => { if input.matches_dsl(binding) { - if let Some(command) = C::try_from_expr(state, &mut exp_iter) { + if let Some(command) = C::try_from_expr(state, &mut e) { return Some(command) } } }, - _ => panic!("invalid config (expected symbol)") + _ => panic!("invalid config (expected symbol, got: {exp_iter:?})") } }, - _ => panic!("invalid config (expected expression)") + _ => panic!("invalid config (expected expression, got: {next:?})") } } None diff --git a/output/src/view.rs b/output/src/view.rs index f2e9ef4..484194d 100644 --- a/output/src/view.rs +++ b/output/src/view.rs @@ -54,7 +54,7 @@ pub trait ViewContext<'state, E: Output + 'state>: Send + Sync match value { Value::Sym(_) => self.get_content_sym(value), Value::Exp(_, _) => self.get_content_exp(value), - _ => panic!("only :symbols and (expressions) accepted here") + _ => panic!("only :symbols and (expressions) accepted here, got: {value:?}") } } fn get_content_sym <'source: 'state> (&'state self, value: &Value<'source>)