Move default comparisons into builtin.

This commit is contained in:
Stephen Chung
2021-03-02 23:08:54 +08:00
parent 5b1f80f5ce
commit 7262d63909
7 changed files with 60 additions and 77 deletions

View File

@@ -52,7 +52,7 @@ pub trait RegisterResultFn<FN, ARGS> {
/// use rhai::{Engine, Dynamic, RegisterResultFn, EvalAltResult};
///
/// // Normal function
/// fn div(x: i64, y: i64) -> RhaiResult {
/// fn div(x: i64, y: i64) -> Result<Dynamic, Box<EvalAltResult>> {
/// if y == 0 {
/// // '.into()' automatically converts to 'Box<EvalAltResult::ErrorRuntime>'
/// Err("division by zero!".into())