diff --git a/Cargo.toml b/Cargo.toml index bbe1bd2bb..93c5ae74f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,10 @@ edition = "2018" crate-type = ["cdylib", "rlib"] [dev-dependencies] -wasm-bindgen-test = "^0.2.33" # NOTE: keep in sync with wasm-bindgen version +wasm-bindgen-test = "^0.2.37" # NOTE: keep in sync with wasm-bindgen version [dependencies] +# NOTE: keep in sync with wasm-bindgen-test version wasm-bindgen = {version = "^0.2.37", features = ["serde-serialize"]} js-sys = "0.3.6" console_error_panic_hook = "^0.1.5" diff --git a/src/dom_types.rs b/src/dom_types.rs index c60831b15..2f3ebbd5d 100644 --- a/src/dom_types.rs +++ b/src/dom_types.rs @@ -1331,11 +1331,11 @@ pub fn will_unmount(mut actions: impl FnMut(&web_sys::Node) + 'static) -> WillUn #[cfg(test)] pub mod tests { - use crate as seed; + // use crate as seed; // required for macros to work. // use crate::prelude::*; - use super::*; - use crate::{attrs, div, h1, p, section, span}; + // use super::*; + // use crate::{attrs, div, h1, p, section, span}; //use wasm_bindgen_test::*; // todo suddenly error about undec type/mod //use wasm_bindgen_test::wasm_bindgen_test_configure; diff --git a/src/lib.rs b/src/lib.rs index 35c93ba85..dc030f473 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -104,12 +104,13 @@ pub mod tests { /// This is a minimal app, that should build. Will fail if there's a breaking /// change. #[wasm_bindgen_test] + #[allow(dead_code)] pub fn app_builds() { use crate as seed; // required for macros to work. use crate::prelude::*; use crate::{ div, - dom_types::{El, At, UpdateEl, mouse_ev}, + dom_types::{El, UpdateEl, mouse_ev}, vdom::Update, }; @@ -134,15 +135,15 @@ pub mod tests { } } - fn view(_state: seed::App, model: &Model) -> El { + fn view(_state: seed::App, _model: &Model) -> El { div!["Hello world"] } - fn window_events(model: &Model) -> Vec> { + fn window_events(_model: &Model) -> Vec> { vec![mouse_ev("mousemove", |_| Msg::Increment)] } - fn routes(url: &seed::Url) -> Msg { + fn routes(_url: &seed::Url) -> Msg { Msg::Increment } diff --git a/src/routing.rs b/src/routing.rs index 9e85d26bd..4c52563a8 100644 --- a/src/routing.rs +++ b/src/routing.rs @@ -189,7 +189,7 @@ pub fn setup_popstate_listener(app: &App, routes: fn(&Url) -> let url: Url = match ev.state().as_string() { Some(state_str) => serde_json::from_str(&state_str) - .expect("Problem deserialzing popstate state"), + .expect("Problem deserializing popstate state"), // This might happen if we go back to a page before we started routing. (?) None => { let empty: Vec = Vec::new(); diff --git a/src/vdom.rs b/src/vdom.rs index 2ac7867a7..20cca663c 100644 --- a/src/vdom.rs +++ b/src/vdom.rs @@ -64,7 +64,7 @@ type StoredPopstate = RefCell>>; pub struct AppData { // Model is in a RefCell