Skip to content

Commit

Permalink
feat: don't print rhai signatures on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
e-matteson committed Apr 27, 2024
1 parent c4c695c commit d1643ee
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ const INTERNALS_MODULE_PATH: &str = "scripts/internals_module.rhai";
const INIT_PATH: &str = "scripts/init.rhai";
const MAIN_PATH: &str = "scripts/main.rhai";

#[allow(unused)]
fn print_signatures(engine: &rhai::Engine) {
println!("Signatures:");
engine
.gen_fn_signatures(false)
.into_iter()
.for_each(|func| println!(" {func}"));
println!();
}

fn make_engine() -> rhai::Engine {
let mut engine = rhai::Engine::new();
engine.set_fail_on_invalid_map_property(true);
Expand All @@ -25,14 +35,6 @@ fn make_engine() -> rhai::Engine {
engine.build_type::<synless::SynlessError>();
engine.build_type::<synless::Construct>();
engine.build_type::<synless::Language>();

println!("Signatures:");
engine
.gen_fn_signatures(false)
.into_iter()
.for_each(|func| println!(" {func}"));
println!();

engine
}

Expand Down

0 comments on commit d1643ee

Please sign in to comment.