Minor improvements

This commit is contained in:
Pauan 2021-07-30 22:27:19 +02:00
parent fac7851cdd
commit 28646a7f97
5 changed files with 22 additions and 1 deletions

View File

@ -10,6 +10,11 @@ edition = "2018"
[profile.release]
lto = true
codegen-units = 1
opt-level = 3 # 3 => fast, s/z => small
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4"] # O4 => fast, Oz/Os => small
[lib]
crate-type = ["cdylib"]

View File

@ -10,6 +10,11 @@ edition = "2018"
[profile.release]
lto = true
codegen-units = 1
opt-level = 3 # 3 => fast, s/z => small
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4"] # O4 => fast, Oz/Os => small
[lib]
crate-type = ["cdylib"]

View File

@ -10,6 +10,11 @@ edition = "2018"
[profile.release]
lto = true
codegen-units = 1
opt-level = 3 # 3 => fast, s/z => small
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4"] # O4 => fast, Oz/Os => small
[lib]
crate-type = ["cdylib"]

View File

@ -10,6 +10,11 @@ edition = "2018"
[profile.release]
lto = true
codegen-units = 1
opt-level = 3 # 3 => fast, s/z => small
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4"] # O4 => fast, Oz/Os => small
[lib]
crate-type = ["cdylib"]

View File

@ -457,7 +457,7 @@ impl<A> DomBuilder<A> {
#[inline]
pub fn apply<F>(self, f: F) -> Self where F: FnOnce(Self) -> Self {
self.apply_if(true, f)
f(self)
}
#[inline]
@ -485,6 +485,7 @@ impl<A> DomBuilder<A> where A: Clone {
f(self, element)
}
#[deprecated(since = "0.5.20", note = "Use the with_node macro instead")]
#[inline]
pub fn before_inserted<F>(self, f: F) -> Self where F: FnOnce(A) {
let element = self.element.clone();