Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
xusd320 committed Jul 18, 2024
1 parent b41e366 commit f1b964c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/niddle_napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ crate-type = ["cdylib"]

[dependencies]
html5ever = "0.27.0"
indexmap = { version = "2.2.6", default-features = false, falsefeatures = ["rayon"] }
indexmap = "2.2.6"
kuchikiki = { git = "https://github.com/brave/kuchikiki.git", rev = "28e1ec0" }
# 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"] }
Expand Down
9 changes: 7 additions & 2 deletions crates/niddle_napi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ mod tests {

#[bench]
fn bench_parse(b: &mut Bencher) {
let html = include_str!("../test/jquery.html").to_string();
b.iter(|| parse(html.clone()));
let html = include_str!("../../../test/jquery.html").to_string();
b.iter(|| {
parse(html.clone())
.select("html".to_string())
.unwrap()
.outer_html()
});
}
}

0 comments on commit f1b964c

Please sign in to comment.