Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Update rss to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jBugman committed Jun 22, 2022
1 parent 19f5c20 commit 73e8736
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 128 deletions.
139 changes: 16 additions & 123 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "feeds-to-instapaper"
version = "0.12.4"
version = "0.12.5"
authors = ["Sergey Parshukov <codedby@bugman.me>"]
edition = "2018"
readme = "README.md"
Expand All @@ -21,7 +21,7 @@ clap = "2.31.2"
csv = "1.0.0-beta.5"
dialoguer = "0.10"
reqwest = { version = "0.11", features = ["blocking"] }
rss = "1.10"
rss = "2.0"
serde = "1.0"
serde_derive = "1.0"
serde_yaml = "0.8.24"
Expand Down
6 changes: 3 additions & 3 deletions src/syndication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ impl FromStr for Feed {
impl From<atom::Feed> for Feed {
fn from(src: atom::Feed) -> Self {
Feed {
title: src.title().to_owned(),
description: src.subtitle().map(str::to_owned),
title: String::from(src.title().as_str()),
description: src.subtitle().map(atom::Text::as_str).map(String::from),
last_update: Some(src.updated().to_rfc3339()),
link: find_alternate(src.links()),
items: src.entries().iter().map(Item::from).collect(),
Expand Down Expand Up @@ -72,7 +72,7 @@ impl From<&rss::Item> for Item {
impl From<&atom::Entry> for Item {
fn from(src: &atom::Entry) -> Self {
Item {
title: Some(src.title().to_owned()),
title: Some(src.title().to_string()),
pub_date: src.published().map(atom::FixedDateTime::to_rfc3339),
link: find_alternate(src.links()),
}
Expand Down

0 comments on commit 73e8736

Please # to comment.