Skip to content

Commit

Permalink
refactor: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
xusd320 committed Jul 19, 2024
1 parent afdebaa commit 1ff35bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[workspace]
members = ["crates/*"]
members = ["crates/*"]
resolver = "2"

[workspace.dependencies]
html5ever = "0.27.0"
indexmap = "2.2.6"
kuchikiki = { git = "https://github.com/xusd320/kuchikiki.git", rev = "c671c7b" }

[profile.release]
lto = true
Expand Down
7 changes: 4 additions & 3 deletions crates/niddle_napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ version = "0.0.0"
crate-type = ["cdylib"]

[dependencies]
html5ever = "0.27.0"
indexmap = "2.2.6"
kuchikiki = { git = "https://github.com/xusd320/kuchikiki.git", rev = "c671c7b" }
html5ever = { workspace = true }
indexmap = { workspace = true }
kuchikiki = { workspace = true }

# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
napi = { version = "3.0.0-alpha.7", default-features = false, features = ["object_indexmap"] }
napi-derive = "3.0.0-alpha.6"
Expand Down
7 changes: 1 addition & 6 deletions crates/niddle_napi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ mod tests {
#[bench]
fn bench_parse(b: &mut Bencher) {
let html = include_str!("../../../test/jquery.html").to_string();
b.iter(|| {
parse(html.clone())
.select("html".to_string())
.unwrap()
.outer_html()
});
b.iter(|| parse(html.to_string()));
}
}

0 comments on commit 1ff35bc

Please sign in to comment.