Skip to content

Commit

Permalink
Remove format::{format_localized, format_item_localized}
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Sep 23, 2023
1 parent 68a141e commit c1a559e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 50 deletions.
47 changes: 0 additions & 47 deletions src/format/formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions src/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c1a559e

Please sign in to comment.