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