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

@@ -318,11 +318,12 @@ impl Engine {
) -> &mut Self {
self.custom_syntax.insert(
key.into(),
Box::new(CustomSyntax {
CustomSyntax {
parse: Box::new(parse),
func: (Box::new(func) as Box<FnCustomSyntaxEval>).into(),
scope_changed,
}),
}
.into(),
);
self
}