Box errors to reduce return type footprint.

This commit is contained in:
Stephen Chung
2020-04-18 00:14:33 +08:00
parent 4a80997d6c
commit f5fff828e8
8 changed files with 198 additions and 160 deletions

View File

@@ -114,7 +114,7 @@ fn call_fn(
fn_name: &str,
args: &mut FnCallArgs,
pos: Position,
) -> Result<Option<Dynamic>, EvalAltResult> {
) -> Result<Option<Dynamic>, Box<EvalAltResult>> {
// Search built-in's and external functions
functions
.and_then(|f| f.get(&calc_fn_spec(fn_name, args.iter().map(|a| a.type_id()))))