Fix builds.

This commit is contained in:
Stephen Chung
2021-11-27 23:29:32 +08:00
parent 4fc088a0f1
commit 9c4ed44ab8
3 changed files with 16 additions and 10 deletions

View File

@@ -34,6 +34,8 @@ pub trait FuncArgs {
/// }
///
/// # fn main() -> Result<(), Box<rhai::EvalAltResult>> {
/// # #[cfg(not(feature = "no_function"))]
/// # {
/// let options = Options { foo: false, bar: "world".to_string(), baz: 42 };
///
/// let engine = Engine::new();
@@ -49,6 +51,7 @@ pub trait FuncArgs {
/// let result: String = engine.call_fn(&mut scope, &ast, "hello", options)?;
///
/// assert_eq!(result, "world42");
/// # }
/// # Ok(())
/// # }
/// ```