Skip to content

Commit

Permalink
Update quick-xml to 0.36
Browse files Browse the repository at this point in the history
  • Loading branch information
andy128k committed Aug 27, 2024
1 parent 8a6dc70 commit 855d23f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Update `quick-xml` to 0.36. [`#166`](https://github.com/rust-syndication/rss/pull/166)

## 2.0.8 - 2024-05-11

- Update quick-xml and derive_builder dependencies. [`#162`](https://github.com/rust-syndication/rss/pull/162)
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.31", features = ["encoding"] }
quick-xml = { version = "0.36", 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
2 changes: 1 addition & 1 deletion src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ impl Channel {
/// ```
pub fn read_from<R: BufRead>(reader: R) -> Result<Channel, Error> {
let mut reader = Reader::from_reader(reader);
reader.trim_text(true).expand_empty_elements(true);
reader.config_mut().expand_empty_elements = true;
let namespaces;
let mut buf = Vec::new();

Expand Down
4 changes: 2 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub(crate) fn attr_value<'s, B: BufRead>(
attr: &'s Attribute<'s>,
reader: &Reader<B>,
) -> Result<Cow<'s, str>, Error> {
let value = attr.decode_and_unescape_value(reader)?;
let value = attr.decode_and_unescape_value(reader.decoder())?;
Ok(value)
}

Expand Down Expand Up @@ -58,5 +58,5 @@ pub fn element_text<R: BufRead>(reader: &mut Reader<R>) -> Result<Option<String>
buf.clear();
}

Ok(Some(content).filter(|c| !c.is_empty()))
Ok(Some(content.trim().to_owned()).filter(|c| !c.is_empty()))
}

0 comments on commit 855d23f

Please sign in to comment.