Skip to content

Commit 137a763

Browse files
Fix feature unification conflict for quick-xml-depending crates (#42)
1 parent 14e4e86 commit 137a763

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ed25519-dalek = { version = "2.0", optional = true }
2929
flate2 = "1.0.25"
3030
mail-parser = { version = "0.11", features = ["full_encoding"] }
3131
mail-builder = { version = "0.4" }
32-
quick-xml = { version = "0.37", optional = true }
32+
quick-xml = { version = "0.37", features = ["encoding"], optional = true }
3333
ring = { version = "0.17", optional = true }
3434
rsa = { version = "0.9.8", optional = true }
3535
rustls-pemfile = { version = "2", optional = true }

src/report/dmarc/parse.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,17 +304,18 @@ impl Extension {
304304
buf: &mut Vec<u8>,
305305
extensions: &mut Vec<Extension>,
306306
) -> Result<(), String> {
307+
let decoder = reader.decoder();
307308
while let Some(tag) = reader.next_tag(buf)? {
308309
match tag.name().as_ref() {
309310
b"extension" => {
310311
let mut e = Extension::default();
311312
if let Ok(Some(attr)) = tag.try_get_attribute("name") {
312-
if let Ok(attr) = attr.unescape_value() {
313+
if let Ok(attr) = attr.decode_and_unescape_value(decoder) {
313314
e.name = attr.to_string();
314315
}
315316
}
316317
if let Ok(Some(attr)) = tag.try_get_attribute("definition") {
317-
if let Ok(attr) = attr.unescape_value() {
318+
if let Ok(attr) = attr.decode_and_unescape_value(decoder) {
318319
e.definition = attr.to_string();
319320
}
320321
}

0 commit comments

Comments
 (0)