mirror of
https://github.com/chronotope/chrono.git
synced 2025-09-30 14:32:19 +00:00
Remove format::{format_localized, format_item_localized}
This commit is contained in:
parent
68a141eba0
commit
4d28a89325
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user