From 4d28a8932539cd2934a27db6630322a32431cbaf Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Sat, 23 Sep 2023 13:40:21 +0200 Subject: [PATCH] Remove `format::{format_localized, format_item_localized}` --- src/format/formatting.rs | 47 ---------------------------------------- src/format/mod.rs | 3 --- 2 files changed, 50 deletions(-) diff --git a/src/format/formatting.rs b/src/format/formatting.rs index 46e9663440..8cb83c7521 100644 --- a/src/format/formatting.rs +++ b/src/format/formatting.rs @@ -188,53 +188,6 @@ pub fn format_item( .fmt(w) } -/// Tries to format given arguments with given formatting items. -/// Internally used by `DelayedFormat`. -#[cfg(all(feature = "unstable-locales", feature = "alloc"))] -#[deprecated(since = "0.4.32", note = "Use DelayedFormat::fmt instead")] -pub fn format_localized<'a, I, B>( - w: &mut fmt::Formatter, - date: Option<&NaiveDate>, - time: Option<&NaiveTime>, - off: Option<&(String, FixedOffset)>, - items: I, - locale: Locale, -) -> fmt::Result -where - I: Iterator + Clone, - B: Borrow>, -{ - DelayedFormat { - date: date.copied(), - time: time.copied(), - off: off.cloned(), - items, - locale: Some(locale), - } - .fmt(w) -} - -/// Formats single formatting item -#[cfg(all(feature = "unstable-locales", feature = "alloc"))] -#[deprecated(since = "0.4.32", note = "Use DelayedFormat::fmt instead")] -pub fn format_item_localized( - w: &mut fmt::Formatter, - date: Option<&NaiveDate>, - time: Option<&NaiveTime>, - off: Option<&(String, FixedOffset)>, - item: &Item<'_>, - locale: Locale, -) -> fmt::Result { - DelayedFormat { - date: date.copied(), - time: time.copied(), - off: off.cloned(), - items: [item].into_iter(), - locale: Some(locale), - } - .fmt(w) -} - #[cfg(feature = "alloc")] fn format_inner( w: &mut impl Write, diff --git a/src/format/mod.rs b/src/format/mod.rs index 46723eff9c..df75b4ffbc 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -61,9 +61,6 @@ pub(crate) use formatting::write_rfc3339; #[cfg(feature = "alloc")] #[allow(deprecated)] pub use formatting::{format, format_item, DelayedFormat}; -#[cfg(all(feature = "unstable-locales", feature = "alloc"))] -#[allow(deprecated)] -pub use formatting::{format_item_localized, format_localized}; #[cfg(feature = "unstable-locales")] pub use locales::Locale; pub(crate) use parse::parse_rfc3339;