Remove unnecessary data.

This commit is contained in:
Stephen Chung
2022-10-25 08:31:13 +08:00
parent 05b9c83bb8
commit 6880d44900
3 changed files with 23 additions and 16 deletions

View File

@@ -189,7 +189,7 @@ impl Engine {
let var_name = expr.get_variable_name(true).expect("`Expr::Variable`");
match scope.get_index(var_name) {
Some((index, _)) => index,
Some(index) => index,
None => {
return match self.global_modules.iter().find_map(|m| m.get_var(var_name)) {
Some(val) => Ok((val.into(), var_pos)),