Simplify if let.
This commit is contained in:
@@ -577,11 +577,12 @@ impl Engine {
|
||||
}
|
||||
|
||||
let mut empty_scope;
|
||||
let scope = if let Some(scope) = _scope {
|
||||
scope
|
||||
} else {
|
||||
empty_scope = Scope::new();
|
||||
&mut empty_scope
|
||||
let scope = match _scope {
|
||||
Some(scope) => scope,
|
||||
None => {
|
||||
empty_scope = Scope::new();
|
||||
&mut empty_scope
|
||||
}
|
||||
};
|
||||
|
||||
let result = if _is_method_call {
|
||||
|
Reference in New Issue
Block a user