@@ -259,6 +259,7 @@ impl<'a> Formatter<'a> {
259
259
/// Currently not intended for use outside of the standard library.
260
260
#[ unstable( feature = "fmt_internals" , reason = "internal to standard library" , issue = "none" ) ]
261
261
#[ doc( hidden) ]
262
+ #[ inline]
262
263
pub fn new ( buf : & ' a mut ( dyn Write + ' a ) ) -> Formatter < ' a > {
263
264
Formatter {
264
265
flags : 0 ,
@@ -1590,6 +1591,7 @@ impl<'a> Formatter<'a> {
1590
1591
note = "use the `sign_plus`, `sign_minus`, `alternate`, \
1591
1592
or `sign_aware_zero_pad` methods instead"
1592
1593
) ]
1594
+ #[ inline]
1593
1595
pub fn flags ( & self ) -> u32 {
1594
1596
self . flags
1595
1597
}
@@ -1623,6 +1625,7 @@ impl<'a> Formatter<'a> {
1623
1625
/// ```
1624
1626
#[ must_use]
1625
1627
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
1628
+ #[ inline]
1626
1629
pub fn fill ( & self ) -> char {
1627
1630
self . fill
1628
1631
}
@@ -1658,6 +1661,7 @@ impl<'a> Formatter<'a> {
1658
1661
/// ```
1659
1662
#[ must_use]
1660
1663
#[ stable( feature = "fmt_flags_align" , since = "1.28.0" ) ]
1664
+ #[ inline]
1661
1665
pub fn align ( & self ) -> Option < Alignment > {
1662
1666
match self . align {
1663
1667
rt:: Alignment :: Left => Some ( Alignment :: Left ) ,
@@ -1693,6 +1697,7 @@ impl<'a> Formatter<'a> {
1693
1697
/// ```
1694
1698
#[ must_use]
1695
1699
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
1700
+ #[ inline]
1696
1701
pub fn width ( & self ) -> Option < usize > {
1697
1702
self . width
1698
1703
}
@@ -1724,6 +1729,7 @@ impl<'a> Formatter<'a> {
1724
1729
/// ```
1725
1730
#[ must_use]
1726
1731
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
1732
+ #[ inline]
1727
1733
pub fn precision ( & self ) -> Option < usize > {
1728
1734
self . precision
1729
1735
}
@@ -1756,6 +1762,7 @@ impl<'a> Formatter<'a> {
1756
1762
/// ```
1757
1763
#[ must_use]
1758
1764
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
1765
+ #[ inline]
1759
1766
pub fn sign_plus ( & self ) -> bool {
1760
1767
self . flags & ( 1 << rt:: Flag :: SignPlus as u32 ) != 0
1761
1768
}
@@ -1785,6 +1792,7 @@ impl<'a> Formatter<'a> {
1785
1792
/// ```
1786
1793
#[ must_use]
1787
1794
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
1795
+ #[ inline]
1788
1796
pub fn sign_minus ( & self ) -> bool {
1789
1797
self . flags & ( 1 << rt:: Flag :: SignMinus as u32 ) != 0
1790
1798
}
@@ -1813,6 +1821,7 @@ impl<'a> Formatter<'a> {
1813
1821
/// ```
1814
1822
#[ must_use]
1815
1823
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
1824
+ #[ inline]
1816
1825
pub fn alternate ( & self ) -> bool {
1817
1826
self . flags & ( 1 << rt:: Flag :: Alternate as u32 ) != 0
1818
1827
}
@@ -1839,16 +1848,19 @@ impl<'a> Formatter<'a> {
1839
1848
/// ```
1840
1849
#[ must_use]
1841
1850
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
1851
+ #[ inline]
1842
1852
pub fn sign_aware_zero_pad ( & self ) -> bool {
1843
1853
self . flags & ( 1 << rt:: Flag :: SignAwareZeroPad as u32 ) != 0
1844
1854
}
1845
1855
1846
1856
// FIXME: Decide what public API we want for these two flags.
1847
1857
// https://github.com/rust-lang/rust/issues/48584
1858
+ #[ inline]
1848
1859
fn debug_lower_hex ( & self ) -> bool {
1849
1860
self . flags & ( 1 << rt:: Flag :: DebugLowerHex as u32 ) != 0
1850
1861
}
1851
1862
1863
+ #[ inline]
1852
1864
fn debug_upper_hex ( & self ) -> bool {
1853
1865
self . flags & ( 1 << rt:: Flag :: DebugUpperHex as u32 ) != 0
1854
1866
}
0 commit comments