Merge pull request #1101 from andrehjr/port-rust-2018-edition-examples-v1

Port examples: add, canvas, char and hello_world to rust 2018 edition examples
This commit is contained in:
Alex Crichton 2018-12-11 08:52:48 -05:00 committed by GitHub
commit 6eeb54bf9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 4 additions and 10 deletions

View File

@ -2,6 +2,7 @@
name = "add"
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]

View File

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

View File

@ -1,7 +1,3 @@
extern crate js_sys;
extern crate wasm_bindgen;
extern crate web_sys;
use std::f64;
use wasm_bindgen::prelude::*;
use wasm_bindgen::JsCast;

View File

@ -2,6 +2,7 @@
name = "char"
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::*;
// lifted from the `console_log` example

View File

@ -2,6 +2,7 @@
name = "hello_world"
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]