Reformat.

This commit is contained in:
Stephen Chung
2020-05-11 23:48:50 +08:00
parent 414f3d3c23
commit 33c9be7efc
7 changed files with 190 additions and 274 deletions

View File

@@ -97,10 +97,10 @@ macro_rules! def_anonymous_fn {
type Output = Box<dyn Fn($($par),*) -> Result<RET, Box<EvalAltResult>>>;
fn create_from_ast(self, ast: AST, entry_point: &str) -> Self::Output {
let name = entry_point.to_string();
let fn_name = entry_point.to_string();
Box::new(move |$($par: $par),*| {
self.call_fn(&mut Scope::new(), &ast, &name, ($($par,)*))
self.call_fn(&mut Scope::new(), &ast, &fn_name, ($($par,)*))
})
}