Skip to content

Commit

Permalink
perf: use forked kuchikiki
Browse files Browse the repository at this point in the history
  • Loading branch information
xusd320 committed Jul 19, 2024
1 parent f1b964c commit 698091d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/niddle_napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
html5ever = "0.27.0"
indexmap = "2.2.6"
kuchikiki = { git = "https://github.com/brave/kuchikiki.git", rev = "28e1ec0" }
kuchikiki = { git = "https://github.com/xusd320/kuchikiki.git", rev = "c671c7b" }
# 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
6 changes: 3 additions & 3 deletions crates/niddle_napi/src/node_repr/modify.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use html5ever::LocalName;
use html5ever::{tendril::StrTendril, LocalName};
use indexmap::IndexMap;

use super::NodeRepr;
Expand Down Expand Up @@ -83,7 +83,7 @@ impl NodeRepr {
ele
.attributes
.borrow_mut()
.insert(LocalName::from(name), value);
.insert(LocalName::from(name), StrTendril::from(value));
}
}

Expand All @@ -94,7 +94,7 @@ impl NodeRepr {
ele
.attributes
.borrow_mut()
.insert(LocalName::from(name), value);
.insert(LocalName::from(name), StrTendril::from(value));
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/niddle_napi/src/node_repr/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl NodeRepr {
.iter()
.map(|(expanded_name, attr)| {
let ExpandedName { local, ns: _ } = expanded_name;
(local.to_string(), attr.value.clone())
(local.to_string(), attr.value.to_string())
})
.collect::<IndexMap<String, String>>()
})
Expand Down

0 comments on commit 698091d

Please sign in to comment.