Skip to content

Commit

Permalink
Update quick-xml to 0.37
Browse files Browse the repository at this point in the history
  • Loading branch information
andy128k committed Nov 16, 2024
1 parent 4b75d0c commit 290bc1e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Remove ambiguous statements about escaping from documentation. [`#171`](https://github.com/rust-syndication/rss/pull/171)
- Update `quick-xml` to 0.37. [`#172`](https://github.com/rust-syndication/rss/pull/172)

## 2.0.9 - 2024-08-28

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ validation = ["chrono", "chrono/std", "url", "mime"]
with-serde = ["serde", "atom_syndication/with-serde"]

[dependencies]
quick-xml = { version = "0.36", features = ["encoding"] }
quick-xml = { version = "0.37", features = ["encoding"] }
atom_syndication = { version = "0.12", optional = true }
chrono = { version = "0.4.31", optional = true, default-features = false, features = ["alloc"] }
derive_builder = { version = "0.20", optional = true }
Expand Down
14 changes: 14 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

use std::error::Error as StdError;
use std::fmt;
use std::io;
use std::str::Utf8Error;
use std::sync::Arc;

use quick_xml::Error as XmlError;

Expand Down Expand Up @@ -51,6 +53,18 @@ impl From<XmlError> for Error {
}
}

impl From<quick_xml::encoding::EncodingError> for Error {
fn from(err: quick_xml::encoding::EncodingError) -> Error {
Error::Xml(XmlError::Encoding(err))
}
}

impl From<io::Error> for Error {
fn from(err: io::Error) -> Error {
Error::Xml(XmlError::Io(Arc::new(err)))
}
}

impl From<Utf8Error> for Error {
fn from(err: Utf8Error) -> Error {
Error::Utf8(err)
Expand Down

0 comments on commit 290bc1e

Please sign in to comment.