Refine docs.

This commit is contained in:
Stephen Chung
2020-12-26 23:21:16 +08:00
parent 66d3af256e
commit 88f63fa24b
16 changed files with 116 additions and 58 deletions

View File

@@ -41,8 +41,8 @@ let mut scope = Scope::new();
// If arguments of the wrong types are passed, the Engine will not find the function.
let result: i64 = engine.call_fn(&mut scope, &ast, "hello", ( String::from("abc"), 123_i64 ) )?;
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// put arguments in a tuple
// ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// return type must be specified put arguments in a tuple
let result: i64 = engine.call_fn(&mut scope, &ast, "hello", (123_i64,) )?;
// ^^^^^^^^^^ tuple of one