Revise required/forbidden features in examples.
This commit is contained in:
@@ -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'.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user