mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-28 12:32:37 +03:00
Fix build of TODO MVC on stable
This commit is contained in:
parent
9a3ef7b747
commit
93564f159f
@ -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"
|
||||
|
||||
|
@ -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 .
|
||||
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
use js_sys::JSON;
|
||||
use wasm_bindgen::prelude::*;
|
||||
use crate::exit;
|
||||
|
||||
/// Stores items into localstorage
|
||||
pub struct Store {
|
||||
|
Loading…
Reference in New Issue
Block a user