Skip to content

Commit

Permalink
Deprecate standalone format* functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Sep 21, 2023
1 parent 9131ec2 commit fe3cef2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/format/formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ impl<'a, I: Iterator<Item = B> + Clone, B: Borrow<Item<'a>>> Display for Delayed
/// Internally used by `DelayedFormat`.
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
#[deprecated(since = "0.4.32")]
pub fn format<'a, I, B>(
w: &mut fmt::Formatter,
date: Option<&NaiveDate>,
Expand All @@ -184,6 +185,7 @@ where
/// Formats single formatting item
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))]
#[deprecated(since = "0.4.32")]
pub fn format_item(
w: &mut fmt::Formatter,
date: Option<&NaiveDate>,
Expand All @@ -206,6 +208,7 @@ pub fn format_item(
/// Internally used by `DelayedFormat`.
#[cfg(feature = "unstable-locales")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-locales")))]
#[deprecated(since = "0.4.32")]
pub fn format_localized<'a, I, B>(
w: &mut fmt::Formatter,
date: Option<&NaiveDate>,
Expand All @@ -231,6 +234,7 @@ where
/// Formats single formatting item
#[cfg(feature = "unstable-locales")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-locales")))]
#[deprecated(since = "0.4.32")]
pub fn format_item_localized(
w: &mut fmt::Formatter,
date: Option<&NaiveDate>,
Expand Down
2 changes: 2 additions & 0 deletions src/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ pub(crate) use formatting::write_rfc2822;
))]
pub(crate) use formatting::write_rfc3339;
#[cfg(any(feature = "alloc", feature = "std"))]
#[allow(deprecated)]
pub use formatting::{format, format_item, DelayedFormat};
#[cfg(feature = "unstable-locales")]
#[allow(deprecated)]
pub use formatting::{format_item_localized, format_localized};
#[cfg(all(feature = "unstable-locales", any(feature = "alloc", feature = "std")))]
pub use locales::Locale;
Expand Down

0 comments on commit fe3cef2

Please sign in to comment.