Add Dynamic::UNIT.
This commit is contained in:
@@ -10,7 +10,7 @@ packages to be used.
|
||||
|
||||
Packages typically contain Rust functions that are callable within a Rhai script.
|
||||
All functions registered in a package is loaded under the _global namespace_
|
||||
(i.e. they're available without module qualifiers).
|
||||
(i.e. they're available without namespace qualifiers).
|
||||
|
||||
Once a package is created (e.g. via `Package::new`), it can be _shared_ (via `Package::get`)
|
||||
among multiple instances of [`Engine`], even across threads (under [`sync`]).
|
||||
|
@@ -45,7 +45,7 @@ engine.register_raw_fn(
|
||||
|
||||
*x += y; // perform the action
|
||||
|
||||
Ok(().into()) // must be 'Result<Dynamic, Box<EvalAltResult>>'
|
||||
Ok(Dynamic::UNIT) // must be 'Result<Dynamic, Box<EvalAltResult>>'
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user