From fc350429202ee6be58a4077c2a2ed548831501b9 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sat, 13 Jan 2024 16:50:45 +0100 Subject: [PATCH] Update chrono and fix doc-tests Chrono changed day formatting in 0.4.31 https://github.com/chronotope/chrono/pull/1272 --- CHANGELOG.md | 2 ++ Cargo.toml | 2 +- src/channel.rs | 4 ++-- src/item.rs | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d4c8d4ab..42d2f635b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Cargo.toml b/Cargo.toml index 8c1f329747..757d3a6040 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/src/channel.rs b/src/channel.rs index f58b1e152b..684cd43cbe 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -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(&mut self, pub_date: V) @@ -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(&mut self, last_build_date: V) diff --git a/src/item.rs b/src/item.rs index 2fa96ad374..173665c0b8 100644 --- a/src/item.rs +++ b/src/item.rs @@ -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(&mut self, pub_date: V)