minor refactor

This commit is contained in:
Lukáš Hozda
2017-12-21 12:28:59 +01:00
parent 13f7f43f98
commit 5edcfc2156
7 changed files with 39 additions and 120 deletions

View File

@@ -24,12 +24,6 @@ fn main() {
engine.register_fn("update", TestStruct::update);
engine.register_fn("new_ts", TestStruct::new);
println!(
"{:?}",
engine.eval::<TestStruct>("let x = new_ts(); x.update(); x")
);
println!(
"{:?}",
engine.eval::<TestStruct>("let x = [new_ts()]; x[0].update(); x[0]")
);
println!("{:?}", engine.eval::<TestStruct>("let x = new_ts(); x.update(); x"));
println!("{:?}", engine.eval::<TestStruct>("let x = [new_ts()]; x[0].update(); x[0]"));
}