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 committed Feb 16, 2024
1 parent 31b6484 commit 62078df
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,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 @@ -464,10 +462,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 62078df

Please sign in to comment.