From 17f902b503c30c398db9612e98dc059d8e7e1846 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 5 Sep 2019 20:25:04 +0200 Subject: [PATCH] Update to quick-xml 0.16. --- Cargo.toml | 2 +- src/element.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4e1632aa..76b4b4dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ license = "MIT" gitlab = { repository = "lumi/minidom-rs" } [dependencies] -quick-xml = "0.15" +quick-xml = "0.16" [features] default = ["comments"] diff --git a/src/element.rs b/src/element.rs index cc9f8e11..68d445e2 100644 --- a/src/element.rs +++ b/src/element.rs @@ -357,7 +357,7 @@ impl Element { } }, Event::CData(s) => { - let text = reader.decode(&s).into_owned(); + let text = reader.decode(&s)?.to_owned(); if text != "" { let current_elem = stack.last_mut().unwrap(); current_elem.append_text_node(text); @@ -370,7 +370,7 @@ impl Element { Event::Comment(_) => return Err(Error::CommentsDisabled), #[cfg(feature = "comments")] Event::Comment(s) => { - let comment = reader.decode(&s).into_owned(); + let comment = reader.decode(&s)?.to_owned(); if comment != "" { let current_elem = stack.last_mut().unwrap(); current_elem.append_comment_node(comment);