Skip to content

Commit

Permalink
Turned public+unstable+hidden functions into private functions
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasHolzmann authored and gitbot committed Feb 20, 2025
1 parent a9ae91d commit 253cd52
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,8 @@ impl FormattingOptions {
Formatter { options: self, buf: write }
}

#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to standard library", issue = "none")]
/// Flags for formatting
pub fn flags(&mut self, flags: u32) {
fn flags(&mut self, flags: u32) {
self.sign = if flags & (1 << rt::Flag::SignPlus as u32) != 0 {
Some(Sign::Plus)
} else if flags & (1 << rt::Flag::SignMinus as u32) != 0 {
Expand All @@ -480,10 +478,8 @@ impl FormattingOptions {
None
};
}
#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to standard library", issue = "none")]
/// Flags for formatting
pub fn get_flags(&self) -> u32 {
fn get_flags(&self) -> u32 {
<bool as Into<u32>>::into(self.get_sign() == Some(Sign::Plus)) << rt::Flag::SignPlus as u32
| <bool as Into<u32>>::into(self.get_sign() == Some(Sign::Minus))
<< rt::Flag::SignMinus as u32
Expand Down

0 comments on commit 253cd52

Please sign in to comment.