aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml5
-rw-r--r--src/lib.rs3
2 files changed, 3 insertions, 5 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 52603a1..2f1a0d2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2018"
8crate-type = ["cdylib", "rlib"] 8crate-type = ["cdylib", "rlib"]
9 9
10[features] 10[features]
11default = ["console_error_panic_hook"] 11default = ["console_error_panic_hook", "wee_alloc"]
12 12
13[dependencies] 13[dependencies]
14wasm-bindgen = "0.2.63" 14wasm-bindgen = "0.2.63"
@@ -22,4 +22,5 @@ wasm-bindgen-test = "0.3.13"
22 22
23[profile.release] 23[profile.release]
24# Tell `rustc` to optimize for small code size. 24# Tell `rustc` to optimize for small code size.
25opt-level = "s" 25opt-level = "z"
26lto = true
diff --git a/src/lib.rs b/src/lib.rs
index 9593d68..ba431d0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,7 +1,6 @@
1mod utils; 1mod utils;
2 2
3use js_sys::Array; 3use js_sys::Array;
4
5use syntax::{ 4use syntax::{
6 ast::{self, AstNode}, 5 ast::{self, AstNode},
7 NodeOrToken, SourceFile, SyntaxElement, SyntaxError, SyntaxNode, 6 NodeOrToken, SourceFile, SyntaxElement, SyntaxError, SyntaxNode,
@@ -10,8 +9,6 @@ use wasm_bindgen::prelude::*;
10 9
11use std::{convert::From, str::FromStr}; 10use std::{convert::From, str::FromStr};
12 11
13// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
14// allocator.
15#[cfg(feature = "wee_alloc")] 12#[cfg(feature = "wee_alloc")]
16#[global_allocator] 13#[global_allocator]
17static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; 14static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;