Merge branch 'upgrade_quick_xml_0.12.1' into 'master'

Upgrade quick-xml to 0.12.1

See merge request lumi/minidom-rs!28
This commit is contained in:
lumi 2018-04-22 12:11:33 +00:00
commit 1634c7dbe5
5 changed files with 13 additions and 10 deletions

View file

@ -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: Version 0.8.0, released 2018-02-18:
* Additions * Additions
- Link Mauve replaced error\_chain with failure ( https://gitlab.com/lumi/minidom-rs/merge_requests/27 ) - Link Mauve replaced error\_chain with failure ( https://gitlab.com/lumi/minidom-rs/merge_requests/27 )

View file

@ -1,6 +1,6 @@
[package] [package]
name = "minidom" name = "minidom"
version = "0.8.0" version = "0.9.0"
authors = [ authors = [
"lumi <lumi@pew.im>", "lumi <lumi@pew.im>",
"Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>", "Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>",
@ -20,6 +20,6 @@ license = "MIT"
gitlab = { repository = "lumi/minidom-rs" } gitlab = { repository = "lumi/minidom-rs" }
[dependencies] [dependencies]
quick-xml = "0.11.0" quick-xml = "0.12.1"
failure = "0.1.1" failure = "0.1.1"
failure_derive = "0.1.1" failure_derive = "0.1.1"

View file

@ -9,8 +9,8 @@ use std::borrow::Cow;
use error::{Error, Result}; use error::{Error, Result};
use quick_xml::reader::Reader as EventReader; use quick_xml::Reader as EventReader;
use quick_xml::writer::Writer as EventWriter; use quick_xml::Writer as EventWriter;
use quick_xml::events::{Event, BytesStart, BytesEnd, BytesText, BytesDecl}; use quick_xml::events::{Event, BytesStart, BytesEnd, BytesText, BytesDecl};
use std::io::BufRead; use std::io::BufRead;
@ -126,11 +126,11 @@ impl Node {
match *self { match *self {
Node::Element(ref elmt) => elmt.write_to_inner(writer)?, Node::Element(ref elmt) => elmt.write_to_inner(writer)?,
Node::Text(ref s) => { 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) => { Node::Comment(ref s) => {
writer.write_event(Event::Comment(BytesText::from_str(s)))?; writer.write_event(Event::Comment(BytesText::from_plain_str(s)))?;
() ()
}, },
}; };

View file

@ -7,7 +7,7 @@ use std::convert::From;
pub enum Error { pub enum Error {
/// An error from quick_xml. /// An error from quick_xml.
#[fail(display = "XML error: {}", _0)] #[fail(display = "XML error: {}", _0)]
XmlError(#[cause] ::quick_xml::errors::Error), XmlError(#[cause] ::quick_xml::Error),
/// An UTF-8 conversion error. /// An UTF-8 conversion error.
#[fail(display = "UTF-8 error: {}", _0)] #[fail(display = "UTF-8 error: {}", _0)]
@ -30,8 +30,8 @@ pub enum Error {
InvalidElement, InvalidElement,
} }
impl From<::quick_xml::errors::Error> for Error { impl From<::quick_xml::Error> for Error {
fn from(err: ::quick_xml::errors::Error) -> Error { fn from(err: ::quick_xml::Error) -> Error {
Error::XmlError(err) Error::XmlError(err)
} }
} }

View file

@ -1,6 +1,6 @@
use std::iter::Iterator; use std::iter::Iterator;
use quick_xml::reader::Reader; use quick_xml::Reader;
use element::Element; use element::Element;