Browse Source

cleanup code

Evan Almloff 2 years ago
parent
commit
5c6c235df0

+ 1 - 5
packages/core/src/lazynodes.rs

@@ -11,11 +11,7 @@
 //! The logic for this was borrowed from <https://docs.rs/stack_dst/0.6.1/stack_dst/>. Unfortunately, this crate does not
 //! support non-static closures, so we've implemented the core logic of `ValueA` in this module.
 
-use smallbox::{
-    smallbox,
-    space::{S1, S16, S4, S8},
-    SmallBox,
-};
+use smallbox::{smallbox, space::S16, SmallBox};
 
 use crate::{innerlude::VNode, ScopeState};
 

+ 1 - 0
packages/interpreter/Cargo.toml

@@ -23,3 +23,4 @@ sledgehammer_utils = { version = "0.1.0" }
 [features]
 default = []
 web = ["wasm-bindgen", "js-sys", "web-sys"]
+sledgehammer = ["wasm-bindgen", "js-sys", "web-sys"]

+ 2 - 2
packages/interpreter/src/lib.rs

@@ -1,8 +1,8 @@
 pub static INTERPRETER_JS: &str = include_str!("./interpreter.js");
 
-#[cfg(feature = "web")]
+#[cfg(feature = "sledgehammer")]
 mod sledgehammer_bindings;
-#[cfg(feature = "web")]
+#[cfg(feature = "sledgehammer")]
 pub use sledgehammer_bindings::*;
 
 #[cfg(feature = "web")]

+ 1 - 1
packages/web/Cargo.toml

@@ -14,7 +14,7 @@ keywords = ["dom", "ui", "gui", "react", "wasm"]
 dioxus-core = { path = "../core", version = "^0.2.1", features = ["serialize"] }
 dioxus-html = { path = "../html", version = "^0.2.1", features = ["wasm-bind"] }
 dioxus-interpreter-js = { path = "../interpreter", version = "^0.2.1", features = [
-    "web"
+    "sledgehammer"
 ] }
 
 js-sys = "0.3.56"