diff --git a/examples/dom/Cargo.toml b/examples/dom/Cargo.toml index 2f1ce44f800..58827226265 100644 --- a/examples/dom/Cargo.toml +++ b/examples/dom/Cargo.toml @@ -2,6 +2,7 @@ name = "dom" version = "0.1.0" authors = ["The wasm-bindgen Developers"] +edition = "2018" [lib] crate-type = ["cdylib"] diff --git a/examples/dom/src/lib.rs b/examples/dom/src/lib.rs index fc6a9628ee0..2e04b4b232f 100644 --- a/examples/dom/src/lib.rs +++ b/examples/dom/src/lib.rs @@ -1,6 +1,3 @@ -extern crate wasm_bindgen; -extern crate web_sys; - use wasm_bindgen::prelude::*; // Called by our JS entry point to run the example diff --git a/examples/fetch/Cargo.toml b/examples/fetch/Cargo.toml index 380cceeafcd..fd2b87cb32e 100644 --- a/examples/fetch/Cargo.toml +++ b/examples/fetch/Cargo.toml @@ -2,6 +2,7 @@ name = "fetch" version = "0.1.0" authors = ["The wasm-bindgen Developers"] +edition = "2018" [lib] crate-type = ["cdylib"] @@ -11,7 +12,7 @@ futures = "0.1.20" wasm-bindgen = { version = "0.2.29", features = ["serde-serialize"] } js-sys = "0.3.6" wasm-bindgen-futures = "0.3.6" -serde = "^1.0.59" +serde = { version = "1.0.80", features = ["derive"] } serde_derive = "^1.0.59" [dependencies.web-sys] diff --git a/examples/fetch/src/lib.rs b/examples/fetch/src/lib.rs index 30588954c56..9ee7340e3bc 100644 --- a/examples/fetch/src/lib.rs +++ b/examples/fetch/src/lib.rs @@ -1,11 +1,3 @@ -extern crate futures; -extern crate js_sys; -extern crate wasm_bindgen; -extern crate wasm_bindgen_futures; -extern crate web_sys; -#[macro_use] -extern crate serde_derive; - use futures::{future, Future}; use js_sys::Promise; use wasm_bindgen::prelude::*; @@ -13,6 +5,7 @@ use wasm_bindgen::JsCast; use wasm_bindgen_futures::future_to_promise; use wasm_bindgen_futures::JsFuture; use web_sys::{Request, RequestInit, RequestMode, Response}; +use serde::{Deserialize, Serialize}; /// A struct to hold some data from the github Branch API. /// diff --git a/examples/guide-supported-types-examples/Cargo.toml b/examples/guide-supported-types-examples/Cargo.toml index a98c80f42a7..3e1d046a60b 100644 --- a/examples/guide-supported-types-examples/Cargo.toml +++ b/examples/guide-supported-types-examples/Cargo.toml @@ -2,6 +2,7 @@ name = "guide-supported-types-examples" version = "0.1.0" authors = ["The wasm-bindgen Developers"] +edition = "2018" [lib] crate-type = ["cdylib"] diff --git a/examples/guide-supported-types-examples/src/lib.rs b/examples/guide-supported-types-examples/src/lib.rs index cd79099eb08..2f209b440f5 100644 --- a/examples/guide-supported-types-examples/src/lib.rs +++ b/examples/guide-supported-types-examples/src/lib.rs @@ -1,7 +1,5 @@ #![allow(unused_variables, dead_code)] -extern crate wasm_bindgen; - pub mod bool; pub mod boxed_js_value_slice; pub mod boxed_number_slices; diff --git a/examples/import_js/Cargo.toml b/examples/import_js/Cargo.toml index 298f50f7324..a706a989299 100644 --- a/examples/import_js/Cargo.toml +++ b/examples/import_js/Cargo.toml @@ -2,6 +2,7 @@ name = "import_js" version = "0.1.0" authors = ["The wasm-bindgen Developers"] +edition = "2018" [lib] crate-type = ["cdylib"] diff --git a/examples/import_js/src/lib.rs b/examples/import_js/src/lib.rs index 9033e8089b3..a010ca93ce1 100644 --- a/examples/import_js/src/lib.rs +++ b/examples/import_js/src/lib.rs @@ -1,5 +1,3 @@ -extern crate wasm_bindgen; - use wasm_bindgen::prelude::*; #[wasm_bindgen(module = "./defined-in-js")]