Remove format::{format_localized, format_item_localized}

This commit is contained in:
Paul Dicker 2023-09-23 13:40:21 +02:00 committed by Paul Dicker
parent 68a141eba0
commit 4d28a89325
2 changed files with 0 additions and 50 deletions

View File

@ -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<Item = B> + Clone,
B: Borrow<Item<'a>>,
{
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,

View File

@ -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;