Simply error code.

This commit is contained in:
Stephen Chung
2020-08-06 10:17:32 +08:00
parent 41b41ff834
commit 2f395492de
16 changed files with 228 additions and 243 deletions

View File

@@ -175,10 +175,7 @@ impl TryFrom<ImmutableString> for FnPtr {
if is_valid_identifier(value.chars()) {
Ok(Self(value, Default::default()))
} else {
Err(Box::new(EvalAltResult::ErrorFunctionNotFound(
value.into(),
Position::none(),
)))
EvalAltResult::ErrorFunctionNotFound(value.into(), Position::none()).into()
}
}
}