@@ -1355,11 +1355,11 @@ impl<'a> Formatter<'a> {
1355
1355
/// }
1356
1356
/// }
1357
1357
///
1358
- /// assert_eq!(& format!("{}", Foo::new(2)), "2");
1359
- /// assert_eq!(& format!("{}", Foo::new(-1)), "-1");
1360
- /// assert_eq!(& format!("{}", Foo::new(0)), "0");
1361
- /// assert_eq!(& format!("{:#}", Foo::new(-1)), "-Foo 1");
1362
- /// assert_eq!(& format!("{:0>#8}", Foo::new(-1)), "00-Foo 1");
1358
+ /// assert_eq!(format!("{}", Foo::new(2)), "2");
1359
+ /// assert_eq!(format!("{}", Foo::new(-1)), "-1");
1360
+ /// assert_eq!(format!("{}", Foo::new(0)), "0");
1361
+ /// assert_eq!(format!("{:#}", Foo::new(-1)), "-Foo 1");
1362
+ /// assert_eq!(format!("{:0>#8}", Foo::new(-1)), "00-Foo 1");
1363
1363
/// ```
1364
1364
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1365
1365
pub fn pad_integral ( & mut self , is_nonnegative : bool , prefix : & str , buf : & str ) -> Result {
@@ -1452,8 +1452,8 @@ impl<'a> Formatter<'a> {
1452
1452
/// }
1453
1453
/// }
1454
1454
///
1455
- /// assert_eq!(& format!("{Foo:<4}"), "Foo ");
1456
- /// assert_eq!(& format!("{Foo:0>4}"), "0Foo");
1455
+ /// assert_eq!(format!("{Foo:<4}"), "Foo ");
1456
+ /// assert_eq!(format!("{Foo:0>4}"), "0Foo");
1457
1457
/// ```
1458
1458
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1459
1459
pub fn pad ( & mut self , s : & str ) -> Result {
@@ -1636,8 +1636,8 @@ impl<'a> Formatter<'a> {
1636
1636
/// }
1637
1637
/// }
1638
1638
///
1639
- /// assert_eq!(& format!("{Foo}"), "Foo");
1640
- /// assert_eq!(& format!("{Foo:0>8}"), "Foo");
1639
+ /// assert_eq!(format!("{Foo}"), "Foo");
1640
+ /// assert_eq!(format!("{Foo:0>8}"), "Foo");
1641
1641
/// ```
1642
1642
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1643
1643
pub fn write_str ( & mut self , data : & str ) -> Result {
@@ -1659,8 +1659,8 @@ impl<'a> Formatter<'a> {
1659
1659
/// }
1660
1660
/// }
1661
1661
///
1662
- /// assert_eq!(& format!("{}", Foo(-1)), "Foo -1");
1663
- /// assert_eq!(& format!("{:0>8}", Foo(2)), "Foo 2");
1662
+ /// assert_eq!(format!("{}", Foo(-1)), "Foo -1");
1663
+ /// assert_eq!(format!("{:0>8}", Foo(2)), "Foo 2");
1664
1664
/// ```
1665
1665
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1666
1666
pub fn write_fmt ( & mut self , fmt : Arguments < ' _ > ) -> Result {
@@ -1703,8 +1703,8 @@ impl<'a> Formatter<'a> {
1703
1703
/// }
1704
1704
///
1705
1705
/// // We set alignment to the right with ">".
1706
- /// assert_eq!(& format!("{Foo:G>3}"), "GGG");
1707
- /// assert_eq!(& format!("{Foo:t>6}"), "tttttt");
1706
+ /// assert_eq!(format!("{Foo:G>3}"), "GGG");
1707
+ /// assert_eq!(format!("{Foo:t>6}"), "tttttt");
1708
1708
/// ```
1709
1709
#[ must_use]
1710
1710
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
@@ -1738,10 +1738,10 @@ impl<'a> Formatter<'a> {
1738
1738
/// }
1739
1739
/// }
1740
1740
///
1741
- /// assert_eq!(& format!("{Foo:<}"), "left");
1742
- /// assert_eq!(& format!("{Foo:>}"), "right");
1743
- /// assert_eq!(& format!("{Foo:^}"), "center");
1744
- /// assert_eq!(& format!("{Foo}"), "into the void");
1741
+ /// assert_eq!(format!("{Foo:<}"), "left");
1742
+ /// assert_eq!(format!("{Foo:>}"), "right");
1743
+ /// assert_eq!(format!("{Foo:^}"), "center");
1744
+ /// assert_eq!(format!("{Foo}"), "into the void");
1745
1745
/// ```
1746
1746
#[ must_use]
1747
1747
#[ stable( feature = "fmt_flags_align" , since = "1.28.0" ) ]
@@ -1767,16 +1767,16 @@ impl<'a> Formatter<'a> {
1767
1767
/// fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
1768
1768
/// if let Some(width) = formatter.width() {
1769
1769
/// // If we received a width, we use it
1770
- /// write!(formatter, "{:width$}", & format!("Foo({})", self.0), width = width)
1770
+ /// write!(formatter, "{:width$}", format!("Foo({})", self.0), width = width)
1771
1771
/// } else {
1772
1772
/// // Otherwise we do nothing special
1773
1773
/// write!(formatter, "Foo({})", self.0)
1774
1774
/// }
1775
1775
/// }
1776
1776
/// }
1777
1777
///
1778
- /// assert_eq!(& format!("{:10}", Foo(23)), "Foo(23) ");
1779
- /// assert_eq!(& format!("{}", Foo(23)), "Foo(23)");
1778
+ /// assert_eq!(format!("{:10}", Foo(23)), "Foo(23) ");
1779
+ /// assert_eq!(format!("{}", Foo(23)), "Foo(23)");
1780
1780
/// ```
1781
1781
#[ must_use]
1782
1782
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
@@ -1806,8 +1806,8 @@ impl<'a> Formatter<'a> {
1806
1806
/// }
1807
1807
/// }
1808
1808
///
1809
- /// assert_eq!(& format!("{:.4}", Foo(23.2)), "Foo(23.2000)");
1810
- /// assert_eq!(& format!("{}", Foo(23.2)), "Foo(23.20)");
1809
+ /// assert_eq!(format!("{:.4}", Foo(23.2)), "Foo(23.2000)");
1810
+ /// assert_eq!(format!("{}", Foo(23.2)), "Foo(23.20)");
1811
1811
/// ```
1812
1812
#[ must_use]
1813
1813
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
@@ -1837,9 +1837,9 @@ impl<'a> Formatter<'a> {
1837
1837
/// }
1838
1838
/// }
1839
1839
///
1840
- /// assert_eq!(& format!("{:+}", Foo(23)), "Foo(+23)");
1841
- /// assert_eq!(& format!("{:+}", Foo(-23)), "Foo(-23)");
1842
- /// assert_eq!(& format!("{}", Foo(23)), "Foo(23)");
1840
+ /// assert_eq!(format!("{:+}", Foo(23)), "Foo(+23)");
1841
+ /// assert_eq!(format!("{:+}", Foo(-23)), "Foo(-23)");
1842
+ /// assert_eq!(format!("{}", Foo(23)), "Foo(23)");
1843
1843
/// ```
1844
1844
#[ must_use]
1845
1845
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
@@ -1867,8 +1867,8 @@ impl<'a> Formatter<'a> {
1867
1867
/// }
1868
1868
/// }
1869
1869
///
1870
- /// assert_eq!(& format!("{:-}", Foo(23)), "-Foo(23)");
1871
- /// assert_eq!(& format!("{}", Foo(23)), "Foo(23)");
1870
+ /// assert_eq!(format!("{:-}", Foo(23)), "-Foo(23)");
1871
+ /// assert_eq!(format!("{}", Foo(23)), "Foo(23)");
1872
1872
/// ```
1873
1873
#[ must_use]
1874
1874
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
@@ -1895,8 +1895,8 @@ impl<'a> Formatter<'a> {
1895
1895
/// }
1896
1896
/// }
1897
1897
///
1898
- /// assert_eq!(& format!("{:#}", Foo(23)), "Foo(23)");
1899
- /// assert_eq!(& format!("{}", Foo(23)), "23");
1898
+ /// assert_eq!(format!("{:#}", Foo(23)), "Foo(23)");
1899
+ /// assert_eq!(format!("{}", Foo(23)), "23");
1900
1900
/// ```
1901
1901
#[ must_use]
1902
1902
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
@@ -1922,7 +1922,7 @@ impl<'a> Formatter<'a> {
1922
1922
/// }
1923
1923
/// }
1924
1924
///
1925
- /// assert_eq!(& format!("{:04}", Foo(23)), "23");
1925
+ /// assert_eq!(format!("{:04}", Foo(23)), "23");
1926
1926
/// ```
1927
1927
#[ must_use]
1928
1928
#[ stable( feature = "fmt_flags" , since = "1.5.0" ) ]
0 commit comments