Better String parameter error message.

This commit is contained in:
Stephen Chung
2020-06-08 10:26:32 +08:00
parent 5fb4b04cb0
commit ead366aac8
3 changed files with 10 additions and 6 deletions

View File

@@ -168,7 +168,7 @@ fn test_string_fn() -> Result<(), Box<EvalAltResult>> {
assert!(matches!(
*engine.eval::<INT>(r#"foo3("hello")"#).expect_err("should error"),
EvalAltResult::ErrorFunctionNotFound(ref x, _) if x == "foo3 (string)"
EvalAltResult::ErrorFunctionNotFound(ref x, _) if x == "foo3 (&str | ImmutableString)"
));
Ok(())