Revise required/forbidden features in examples.

This commit is contained in:
Stephen Chung
2022-07-26 17:05:42 +08:00
parent f188f96974
commit a95ef4c255
7 changed files with 130 additions and 138 deletions

View File

@@ -1,5 +1,10 @@
//! An example showing how to register a Rust type and use it with arrays.
#[cfg(any(feature = "no_index", feature = "no_object"))]
fn main() {
panic!("This example does not run under 'no_index' or 'no_object'.")
}
use rhai::{Engine, EvalAltResult};
#[cfg(not(feature = "no_index"))]
@@ -60,8 +65,3 @@ fn main() -> Result<(), Box<EvalAltResult>> {
Ok(())
}
#[cfg(any(feature = "no_index", feature = "no_object"))]
fn main() {
panic!("This example does not run under 'no_index' or 'no_object'.")
}