Streamline string handling.
This commit is contained in:
@@ -75,7 +75,7 @@ impl Imports {
|
||||
.iter()
|
||||
.enumerate()
|
||||
.rev()
|
||||
.find_map(|(i, key)| if key.as_str() == name { Some(i) } else { None })
|
||||
.find_map(|(i, key)| if *key == name { Some(i) } else { None })
|
||||
}
|
||||
/// Push an imported [modules][Module] onto the stack.
|
||||
#[inline(always)]
|
||||
@@ -996,7 +996,7 @@ impl Engine {
|
||||
};
|
||||
|
||||
// Check if the variable is `this`
|
||||
if name.as_str() == KEYWORD_THIS {
|
||||
if *name == KEYWORD_THIS {
|
||||
return if let Some(val) = this_ptr {
|
||||
Ok(((*val).into(), *pos))
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user