Make API chainable.
This commit is contained in:
@@ -31,8 +31,9 @@ fn get_any_value() -> Result<Dynamic, Box<EvalAltResult>> {
|
||||
|
||||
let mut engine = Engine::new();
|
||||
|
||||
engine.register_fn("add", add_len);
|
||||
engine.register_fn("add_str", add_len_str);
|
||||
engine
|
||||
.register_fn("add", add_len)
|
||||
.register_fn("add_str", add_len_str);
|
||||
|
||||
let result = engine.eval::<i64>(r#"add(40, "xx")"#)?;
|
||||
|
||||
|
Reference in New Issue
Block a user