Use references for switch expressions, if possible.

This commit is contained in:
Stephen Chung
2020-11-14 16:08:48 +08:00
parent 83c7c101d1
commit 56fbe39b7b
4 changed files with 195 additions and 54 deletions

View File

@@ -8,7 +8,7 @@ use crate::optimize::OptimizationLevel;
use crate::parse_error::ParseError;
use crate::result::EvalAltResult;
use crate::scope::Scope;
use crate::token::{Position, NO_POS};
use crate::token::NO_POS;
use crate::utils::get_hasher;
#[cfg(not(feature = "no_index"))]
@@ -21,7 +21,7 @@ use crate::{
use crate::{
engine::{make_getter, make_setter, Map},
parse_error::ParseErrorType,
token::Token,
token::{Position, Token},
};
#[cfg(any(not(feature = "no_index"), not(feature = "no_object")))]