Merge pull request #1103 from T5uku5hi/port-examples-to-rust-2018

Port dom, fetch, guide-supported-types-examples, import_js examples to Rust 2018 edition
This commit is contained in:
Alex Crichton 2018-12-11 16:37:16 -06:00 committed by GitHub
commit 82b322a12f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 6 additions and 16 deletions

View File

@ -2,6 +2,7 @@
name = "dom"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
[lib]
crate-type = ["cdylib"]

View File

@ -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

View File

@ -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]

View File

@ -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.
///

View File

@ -2,6 +2,7 @@
name = "guide-supported-types-examples"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
[lib]
crate-type = ["cdylib"]

View File

@ -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;

View File

@ -2,6 +2,7 @@
name = "import_js"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
[lib]
crate-type = ["cdylib"]

View File

@ -1,5 +1,3 @@
extern crate wasm_bindgen;
use wasm_bindgen::prelude::*;
#[wasm_bindgen(module = "./defined-in-js")]