Change Option<usize> to usize for variable resolver index.

This commit is contained in:
Stephen Chung
2020-10-11 22:41:26 +08:00
parent fd5a932611
commit e343bcfa8f
8 changed files with 68 additions and 29 deletions

View File

@@ -1721,12 +1721,7 @@ impl Engine {
#[inline(always)]
pub fn on_var(
&mut self,
callback: impl Fn(
&str,
Option<usize>,
&Scope,
&EvalContext,
) -> Result<Option<Dynamic>, Box<EvalAltResult>>
callback: impl Fn(&str, usize, &Scope, &EvalContext) -> Result<Option<Dynamic>, Box<EvalAltResult>>
+ SendSync
+ 'static,
) -> &mut Self {