Skip to content

Commit

Permalink
Update chrono and fix doc-tests
Browse files Browse the repository at this point in the history
Chrono changed day formatting in 0.4.31 chronotope/chrono#1272
  • Loading branch information
andy128k committed Jan 13, 2024
1 parent f852731 commit fc35042
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 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 @@

## 2.x.x - Unreleased

- Update `chrono` to 0.4.31 [`#160`](https://github.com/rust-syndication/rss/pull/160)

## 2.0.6 - 2023-08-12

- Take into account namespaces declared locally [`#155`](https://github.com/rust-syndication/rss/pull/155)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ atom = ["atom_syndication"]
quick-xml = { version = "0.30", features = ["encoding"] }
derive_builder = { version = "0.12", optional = true }
never = { version = "0.1", optional = true }
chrono = { version = "0.4", optional = true, default-features = false, features = ["alloc"] }
chrono = { version = "0.4.31", optional = true, default-features = false, features = ["alloc"] }
url = { version = "2.1", optional = true }
mime = { version = "0.3", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ impl Channel {
///
/// let mut channel = Channel::default();
/// channel.set_pub_date(Utc.with_ymd_and_hms(2017, 1, 1, 12, 0, 0).unwrap().to_rfc2822());
/// assert_eq!(channel.pub_date(), Some("Sun, 01 Jan 2017 12:00:00 +0000"));
/// assert_eq!(channel.pub_date(), Some("Sun, 1 Jan 2017 12:00:00 +0000"));
/// # }
/// ```
pub fn set_pub_date<V>(&mut self, pub_date: V)
Expand Down Expand Up @@ -415,7 +415,7 @@ impl Channel {
///
/// let mut channel = Channel::default();
/// channel.set_last_build_date(Utc.with_ymd_and_hms(2017, 1, 1, 12, 0, 0).unwrap().to_rfc2822());
/// assert_eq!(channel.last_build_date(), Some("Sun, 01 Jan 2017 12:00:00 +0000"));
/// assert_eq!(channel.last_build_date(), Some("Sun, 1 Jan 2017 12:00:00 +0000"));
/// # }
/// ```
pub fn set_last_build_date<V>(&mut self, last_build_date: V)
Expand Down
4 changes: 2 additions & 2 deletions src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ impl Item {
///
/// let mut item = Item::default();
/// item.set_pub_date(Utc.with_ymd_and_hms(2017, 1, 1, 12, 0, 0).unwrap().to_rfc2822());
/// assert_eq!(item.pub_date(), Some("Sun, 01 Jan 2017 12:00:00 +0000"));
/// assert_eq!(item.pub_date(), Some("Sun, 1 Jan 2017 12:00:00 +0000"));
///
/// item.set_pub_date(FixedOffset::east_opt(2 * 3600).unwrap().with_ymd_and_hms(2017, 1, 1, 12, 0, 0).unwrap().to_rfc2822());
/// assert_eq!(item.pub_date(), Some("Sun, 01 Jan 2017 12:00:00 +0200"));
/// assert_eq!(item.pub_date(), Some("Sun, 1 Jan 2017 12:00:00 +0200"));
/// # }
/// ```
pub fn set_pub_date<V>(&mut self, pub_date: V)
Expand Down

0 comments on commit fc35042

Please sign in to comment.