Cast DataValues to and from native types

Also, returns a `Result` in the `RunCommand::run` helper.
This commit is contained in:
Andrew Brown
2020-04-21 11:53:50 -07:00
parent cbf7cbfa39
commit b4238229c2
6 changed files with 91 additions and 26 deletions

View File

@@ -98,7 +98,7 @@ fn run_file_contents(file_contents: String) -> Result<(), String> {
parse_run_command(comment.text, &func.signature).map_err(|e| e.to_string())?
{
let compiled_fn = compiler.compile(func.clone()).map_err(|e| e.to_string())?;
command.run(|args| compiled_fn.call(args))?;
command.run(|_, args| Ok(compiled_fn.call(args)))?;
}
}
}