Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate standalone format functions #1306

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

pitdicker
Copy link
Collaborator

Split out from #1163.

In the format module we have 4 standalone format* functions. I don't think they were ever intended to be public.
They need an &mut Formatter<'_> as argument, which can't be constructed outside of a Display implementation.

To deprecated these methods I inlined them in DelayedFormat::Display, and made the methods wrappers around that.

@pitdicker pitdicker changed the title Deprecate format functions Deprecate standalone format functions Sep 21, 2023
@pitdicker
Copy link
Collaborator Author

Oops, 0.4.28 is no longer the next version to mentions in the deprecation 🤣.

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #1306 (0aae70b) into 0.4.x (a32d77a) will decrease coverage by 0.30%.
The diff coverage is 34.69%.

@@            Coverage Diff             @@
##            0.4.x    #1306      +/-   ##
==========================================
- Coverage   91.30%   91.00%   -0.30%     
==========================================
  Files          38       38              
  Lines       17044    17068      +24     
==========================================
- Hits        15562    15533      -29     
- Misses       1482     1535      +53     
Files Changed Coverage Δ
src/format/mod.rs 85.04% <ø> (ø)
src/format/formatting.rs 87.83% <34.69%> (-6.92%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -161,6 +161,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")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a note about what to use instead?

@pitdicker pitdicker merged commit 41e34ad into chronotope:0.4.x Sep 22, 2023
36 of 37 checks passed
@pitdicker pitdicker deleted the deprecate_format_functions branch September 22, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants