rhai/codegen/ui_tests/non_clonable.rs
2020-08-02 19:27:35 -05:00

28 lines
368 B
Rust

use rhai::plugin::*;
struct NonClonable {
a: f32,
b: u32,
c: char,
d: bool,
}
#[export_fn]
pub fn test_fn(input: NonClonable) -> bool {
input.d
}
fn main() {
let n = NonClonable {
a: 0.0,
b: 10,
c: 'a',
d: true,
};
if test_fn(n) {
println!("yes");
} else {
println!("no");
}
}