Skip to content

Commit 863170c

Browse files
committed
xot bump
1 parent b40bd57 commit 863170c

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

xml-mut-cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ name = "xml-mut"
1818
path = "src/main.rs"
1919

2020
[dependencies]
21-
itertools = "0.13.0"
22-
xot = "0.24.0"
21+
itertools = "0.14.0"
22+
xot = "0.28.0"
2323
clap = { version = "4.5.4", features = ["derive"] }
2424
walkdir = "2.5.0"
2525
xml-mut-data = { path = "../xml-mut-data" }

xml-mut-cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
3838
for xml_path in mut_cli.scan().iter() {
3939
let xml = fs::read_to_string(xml_path.clone())?;
4040
let mut xot = Xot::new();
41-
let root = xot.parse(xml.as_str())?;
41+
let root = xot.parse(xml.as_str()).map_err(xot::Error::from)?;
4242
let doc_element_node = xot.document_element(root)?;
4343
let ops = xot.get_operations_all(doc_element_node, mutations)?;
4444

xml-mut-xot/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ authors = ["Tomas Dambrauskas <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
xot = "0.24.0"
8+
xot = "0.28.0"
99
xml-mut-data = { path = "../xml-mut-data" }

xml-mut-xot/src/fitable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl Fitable for Xot {
3535
match value_source {
3636
ValueSelector::Attribute(name) => {
3737
let name_id = ok_or_return_false!(self.name(name));
38-
return self.attributes(node).contains_key(name_id);
38+
self.attributes(node).contains_key(name_id)
3939
}
4040
ValueSelector::Text => {
4141
let child = ok_or_return_false!(self.first_child(node));

xml-mut-xot/src/valuable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use xot::{Node, Xot};
1010
pub trait Valueable {
1111
fn get_value(&self, node: Node, selector: &ValueSelector) -> Option<&str>;
1212
fn get_child_value(&self, node: Node, path: &ValuePath) -> Option<&str>;
13-
fn get_value_of<'a>(&'a self, node: Node, variant: &'a ValueVariant) -> Option<&str> {
13+
fn get_value_of<'a>(&'a self, node: Node, variant: &'a ValueVariant) -> Option<&'a str> {
1414
match variant {
1515
ValueVariant::Selector(path) => self.get_child_value(node, path),
1616
ValueVariant::LiteralString(val) => Some(val),

0 commit comments

Comments
 (0)