File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ name = "rust-webpack"
7
7
readme = " ./README.md"
8
8
repository = " https://github.com/rustwasm/rust-webpack-template"
9
9
version = " 0.1.0"
10
+ edition = " 2018"
10
11
11
12
[lib ]
12
13
crate-type = [" cdylib" ]
Original file line number Diff line number Diff line change 1
- #[ macro_use]
2
- extern crate cfg_if;
3
- extern crate web_sys;
4
- extern crate wasm_bindgen;
5
-
6
1
use wasm_bindgen:: prelude:: * ;
7
2
8
- cfg_if ! {
3
+ cfg_if:: cfg_if ! {
9
4
// When the `console_error_panic_hook` feature is enabled, we can call the
10
5
// `set_panic_hook` function to get better error messages if we ever panic.
11
6
if #[ cfg( feature = "console_error_panic_hook" ) ] {
12
- extern crate console_error_panic_hook;
13
7
use console_error_panic_hook:: set_once as set_panic_hook;
14
8
} else {
15
9
#[ inline]
16
10
fn set_panic_hook( ) { }
17
11
}
18
12
}
19
13
20
- cfg_if ! {
14
+ cfg_if:: cfg_if ! {
21
15
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
22
16
// allocator.
23
17
if #[ cfg( feature = "wee_alloc" ) ] {
24
- extern crate wee_alloc;
25
18
#[ global_allocator]
26
19
static ALLOC : wee_alloc:: WeeAlloc = wee_alloc:: WeeAlloc :: INIT ;
27
20
}
You can’t perform that action at this time.
0 commit comments