From 96f223b7e3b0ce21fe1a023f49527fa221bd4176 Mon Sep 17 00:00:00 2001 From: Matt Bilker Date: Tue, 10 Apr 2018 21:01:18 -0400 Subject: [PATCH] bump version to 0.9.0 and upgrade quick-xml to 0.12.1 --- CHANGELOG.md | 3 +++ Cargo.toml | 4 ++-- src/element.rs | 8 ++++---- src/error.rs | 6 +++--- src/tests.rs | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2f831b7..d3fff023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +Version 0.9.0, released 2018-04-10: + * Small changes + - Upgrade quick_xml to 0.12.1 Version 0.8.0, released 2018-02-18: * Additions - Link Mauve replaced error\_chain with failure ( https://gitlab.com/lumi/minidom-rs/merge_requests/27 ) diff --git a/Cargo.toml b/Cargo.toml index a05552ca..de970054 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "minidom" -version = "0.8.0" +version = "0.9.0" authors = [ "lumi ", "Emmanuel Gil Peyrot ", @@ -20,6 +20,6 @@ license = "MIT" gitlab = { repository = "lumi/minidom-rs" } [dependencies] -quick-xml = "0.11.0" +quick-xml = "0.12.1" failure = "0.1.1" failure_derive = "0.1.1" diff --git a/src/element.rs b/src/element.rs index 81e3fffc..d8a4a98a 100644 --- a/src/element.rs +++ b/src/element.rs @@ -9,8 +9,8 @@ use std::borrow::Cow; use error::{Error, Result}; -use quick_xml::reader::Reader as EventReader; -use quick_xml::writer::Writer as EventWriter; +use quick_xml::Reader as EventReader; +use quick_xml::Writer as EventWriter; use quick_xml::events::{Event, BytesStart, BytesEnd, BytesText, BytesDecl}; use std::io::BufRead; @@ -126,11 +126,11 @@ impl Node { match *self { Node::Element(ref elmt) => elmt.write_to_inner(writer)?, Node::Text(ref s) => { - writer.write_event(Event::Text(BytesText::from_str(s)))?; + writer.write_event(Event::Text(BytesText::from_plain_str(s)))?; () }, Node::Comment(ref s) => { - writer.write_event(Event::Comment(BytesText::from_str(s)))?; + writer.write_event(Event::Comment(BytesText::from_plain_str(s)))?; () }, }; diff --git a/src/error.rs b/src/error.rs index 48f33440..b2ba473c 100644 --- a/src/error.rs +++ b/src/error.rs @@ -7,7 +7,7 @@ use std::convert::From; pub enum Error { /// An error from quick_xml. #[fail(display = "XML error: {}", _0)] - XmlError(#[cause] ::quick_xml::errors::Error), + XmlError(#[cause] ::quick_xml::Error), /// An UTF-8 conversion error. #[fail(display = "UTF-8 error: {}", _0)] @@ -30,8 +30,8 @@ pub enum Error { InvalidElement, } -impl From<::quick_xml::errors::Error> for Error { - fn from(err: ::quick_xml::errors::Error) -> Error { +impl From<::quick_xml::Error> for Error { + fn from(err: ::quick_xml::Error) -> Error { Error::XmlError(err) } } diff --git a/src/tests.rs b/src/tests.rs index b57a2037..2acc9705 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,6 +1,6 @@ use std::iter::Iterator; -use quick_xml::reader::Reader; +use quick_xml::Reader; use element::Element;