Use .into() instead of Box::new()

This commit is contained in:
Stephen Chung
2021-06-29 18:25:20 +08:00
parent 4143ef1e3f
commit 08828dd8c1
8 changed files with 64 additions and 75 deletions

View File

@@ -1206,7 +1206,7 @@ impl Engine {
}
return result.map_err(|err| {
Box::new(EvalAltResult::ErrorInFunctionCall(
EvalAltResult::ErrorInFunctionCall(
KEYWORD_EVAL.to_string(),
state
.source
@@ -1215,7 +1215,8 @@ impl Engine {
.unwrap_or_default(),
err,
pos,
))
)
.into()
});
}