Code style edits.

This commit is contained in:
Stephen Chung
2021-03-16 18:16:40 +08:00
parent 082ecaa739
commit 5172ade179
4 changed files with 101 additions and 110 deletions

View File

@@ -1133,7 +1133,7 @@ impl Engine {
#[cfg(not(feature = "no_index"))]
EvalAltResult::ErrorIndexingType(_, _) => Some(new_val.unwrap()),
// Any other error - return
err => return Err(Box::new(err)),
err => return err.into(),
},
};
@@ -1986,10 +1986,11 @@ impl Engine {
if lhs_ptr.as_ref().is_read_only() {
// Assignment to constant variable
Err(Box::new(EvalAltResult::ErrorAssignmentToConstant(
EvalAltResult::ErrorAssignmentToConstant(
lhs_expr.get_variable_access(false).unwrap().to_string(),
pos,
)))
)
.into()
} else {
self.eval_op_assignment(
mods,