diff --git a/Makefile.toml b/Makefile.toml index e3f35e2..c5708ef 100755 --- a/Makefile.toml +++ b/Makefile.toml @@ -16,22 +16,6 @@ workspace = false command = "cargo" args = ["build", "--release"] -[tasks.build] -description = "Build, and create wasms" -workspace = false -dependencies = ["compile", "create_wasm"] - -[tasks.watch] -description = "Build, create wasms, and watch/recompile files for changes" -workspace = false -dependencies = ["build", "create_wasm"] -watch = { ignore_pattern="pkg/*" } - -[tasks.compile_release] -description = "Build, and create wasms, with the --release flag" -workspace = false -dependencies = ["build_release", "create_wasm_release"] - [tasks.create_wasm] description = "Build with wasm-pack" install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "-V" } @@ -44,6 +28,17 @@ install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "-V command = "wasm-pack" args = ["build", "--target", "no-modules", "--out-name", "package"] +[tasks.build] +description = "Build, and create wasms" +workspace = false +dependencies = ["compile", "create_wasm"] + +[tasks.watch] +description = "Build, create wasms, and watch/recompile files for changes" +workspace = false +dependencies = ["build", "create_wasm"] +watch = { ignore_pattern="pkg/*" } + [tasks.serve] description = "Start server" install_crate = { crate_name = "microserver", binary = "microserver", test_arg = "-h" } diff --git a/src/lib.rs b/src/lib.rs index 0544623..412da65 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,7 +25,7 @@ enum Msg { Increment, } -fn update(msg: Msg, model: &mut Model, _: &mut Orders) { +fn update(msg: Msg, model: &mut Model, _: &mut impl Orders) { match msg { Msg::Increment => model.val += 1, } @@ -34,7 +34,7 @@ fn update(msg: Msg, model: &mut Model, _: &mut Orders) { // View -fn view(model: &Model) -> View { +fn view(model: &Model) -> impl View { button![ simple_ev(Ev::Click, Msg::Increment), format!("Hello, World × {}", model.val) @@ -43,7 +43,7 @@ fn view(model: &Model) -> View { #[wasm_bindgen] pub fn render() { - seed::App::build(Model::default(), update, view) + seed::App::build(|_, _| Model::default(), update, view) .finish() .run();