Skip to content

Commit

Permalink
Cleaned up merge conflicts, and v0.2.10 release
Browse files Browse the repository at this point in the history
  • Loading branch information
David-OConnor committed Mar 3, 2019
2 parents fd0174b + 2e02ed8 commit 7d51506
Show file tree
Hide file tree
Showing 5 changed files with 210 additions and 89 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/dom_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand All @@ -134,15 +135,15 @@ pub mod tests {
}
}

fn view(_state: seed::App<Msg, Model>, model: &Model) -> El<Msg> {
fn view(_state: seed::App<Msg, Model>, _model: &Model) -> El<Msg> {
div!["Hello world"]
}

fn window_events(model: &Model) -> Vec<seed::dom_types::Listener<Msg>> {
fn window_events(_model: &Model) -> Vec<seed::dom_types::Listener<Msg>> {
vec![mouse_ev("mousemove", |_| Msg::Increment)]
}

fn routes(url: &seed::Url) -> Msg {
fn routes(_url: &seed::Url) -> Msg {
Msg::Increment
}

Expand Down
2 changes: 1 addition & 1 deletion src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub fn setup_popstate_listener<Ms, Mdl>(app: &App<Ms, Mdl>, 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<String> = Vec::new();
Expand Down
Loading

0 comments on commit 7d51506

Please sign in to comment.