Fix build of TODO MVC on stable

This commit is contained in:
Alex Crichton 2018-10-29 13:47:09 -07:00
parent 9a3ef7b747
commit 93564f159f
5 changed files with 4 additions and 10 deletions

View File

@ -6,10 +6,6 @@ authors = ["The wasm-bindgen Developers"]
[lib]
crate-type = ["cdylib"]
[profile.release]
lto = true
opt-level = 's'
[build-dependencies]
askama = "0.7.2"

View File

@ -5,9 +5,9 @@
set -ex
cd "$(dirname $0)"
cargo +nightly build --target wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown
cargo +nightly run --manifest-path ../../crates/cli/Cargo.toml \
cargo run --manifest-path ../../crates/cli/Cargo.toml \
--bin wasm-bindgen -- \
../../target/wasm32-unknown-unknown/debug/todomvc.wasm --out-dir .

View File

@ -10,7 +10,6 @@ extern crate js_sys;
extern crate web_sys;
use std::rc::Rc;
#[macro_use]
extern crate askama;
/// Controller of the program

View File

@ -26,7 +26,7 @@ impl Scheduler {
pub fn set_controller(&self, controller: Controller) {
if let Ok(mut controller_data) = self.controller.try_borrow_mut() {
controller_data.replace(controller);
*controller_data = Some(controller);
} else {
exit("This might be a deadlock");
}
@ -34,7 +34,7 @@ impl Scheduler {
pub fn set_view(&self, view: View) {
if let Ok(mut view_data) = self.view.try_borrow_mut() {
view_data.replace(view);
*view_data = Some(view);
} else {
exit("This might be a deadlock");
}

View File

@ -1,6 +1,5 @@
use js_sys::JSON;
use wasm_bindgen::prelude::*;
use crate::exit;
/// Stores items into localstorage
pub struct Store {