Skip to content

Commit 634a556

Browse files
committed
Avoid dropping the result
1 parent ec23144 commit 634a556

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/xml_util.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl XMLUtil {
9292
// Remove the BOM bytes from the stream as they will cause the XML parsing to fail
9393
let len = bom.len();
9494
let mut bom_prefix = vec![0; len];
95-
let _ = r.read_exact(&mut bom_prefix);
95+
r.read_exact(&mut bom_prefix).unwrap();
9696
}
9797

9898
let dom_res = read_reader(r);
@@ -133,7 +133,7 @@ impl XMLUtil {
133133
println!("{}: {}={}", src_file, attr.node_name(), v);
134134
if let Some(repl) = replace {
135135
let res = r.replace_all(&v, *repl);
136-
let _ = attr.set_value(&res); // TODO
136+
attr.set_value(&res).unwrap(); // TODO
137137
changed = true;
138138
}
139139
}
@@ -166,7 +166,7 @@ impl XMLUtil {
166166
println!("{}: {}", src_file, v);
167167
if let Some(repl) = replace {
168168
let res = r.replace_all(&v, *repl);
169-
let _ = n.set_node_value(&res); // TODO
169+
n.set_node_value(&res).unwrap(); // TODO
170170
changed = true;
171171
}
172172
}

0 commit comments

Comments
 (0)