Use Option<Token> instead of Token::NONE.
This commit is contained in:
@@ -159,7 +159,7 @@ impl Engine {
|
||||
|
||||
let op_assign = op_assign_token.literal_syntax();
|
||||
let op = op_token.literal_syntax();
|
||||
let token = op_assign_token.clone();
|
||||
let token = Some(op_assign_token.clone());
|
||||
|
||||
match self
|
||||
.exec_native_fn_call(global, caches, op_assign, token, hash, args, true, *op_pos)
|
||||
@@ -168,7 +168,7 @@ impl Engine {
|
||||
Err(err) if matches!(*err, ERR::ErrorFunctionNotFound(ref f, ..) if f.starts_with(op_assign)) =>
|
||||
{
|
||||
// Expand to `var = var op rhs`
|
||||
let token = op_token.clone();
|
||||
let token = Some(op_token.clone());
|
||||
|
||||
*args[0] = self
|
||||
.exec_native_fn_call(
|
||||
|
Reference in New Issue
Block a user