@@ -749,15 +749,13 @@ declare_clippy_lint! {
749
749
///
750
750
/// ### Example
751
751
/// ```no_run
752
- /// # #![allow(unused)]
753
752
/// (0_i32..10)
754
753
/// .filter(|n| n.checked_add(1).is_some())
755
754
/// .map(|n| n.checked_add(1).unwrap());
756
755
/// ```
757
756
///
758
757
/// Use instead:
759
758
/// ```no_run
760
- /// # #[allow(unused)]
761
759
/// (0_i32..10).filter_map(|n| n.checked_add(1));
762
760
/// ```
763
761
#[ clippy:: version = "1.51.0" ]
@@ -850,7 +848,6 @@ declare_clippy_lint! {
850
848
///
851
849
/// ### Example
852
850
/// ```no_run
853
- /// # #![allow(unused)]
854
851
/// let vec = vec![1];
855
852
/// vec.iter().find(|x| **x == 0).is_some();
856
853
///
@@ -862,7 +859,6 @@ declare_clippy_lint! {
862
859
/// let vec = vec![1];
863
860
/// vec.iter().any(|x| *x == 0);
864
861
///
865
- /// # #[allow(unused)]
866
862
/// !"hello world".contains("world");
867
863
/// ```
868
864
#[ clippy:: version = "pre 1.29.0" ]
@@ -1505,7 +1501,6 @@ declare_clippy_lint! {
1505
1501
///
1506
1502
/// ### Example
1507
1503
/// ```no_run
1508
- /// # #[allow(unused)]
1509
1504
/// (0..3).fold(false, |acc, x| acc || x > 2);
1510
1505
/// ```
1511
1506
///
@@ -2008,13 +2003,11 @@ declare_clippy_lint! {
2008
2003
///
2009
2004
/// ### Example
2010
2005
/// ```no_run
2011
- /// # #[allow(unused)]
2012
2006
/// "Hello".bytes().nth(3);
2013
2007
/// ```
2014
2008
///
2015
2009
/// Use instead:
2016
2010
/// ```no_run
2017
- /// # #[allow(unused)]
2018
2011
/// "Hello".as_bytes().get(3);
2019
2012
/// ```
2020
2013
#[ clippy:: version = "1.52.0" ]
@@ -2059,7 +2052,6 @@ declare_clippy_lint! {
2059
2052
///
2060
2053
/// ### Example
2061
2054
/// ```no_run
2062
- /// # #![allow(unused)]
2063
2055
/// let some_vec = vec![0, 1, 2, 3];
2064
2056
///
2065
2057
/// some_vec.iter().count();
@@ -3656,15 +3648,13 @@ declare_clippy_lint! {
3656
3648
///
3657
3649
/// ### Example
3658
3650
/// ```no_run
3659
- /// # #![allow(unused)]
3660
3651
/// let owned_string = "This is a string".to_owned();
3661
3652
/// owned_string.as_str().as_bytes()
3662
3653
/// # ;
3663
3654
/// ```
3664
3655
///
3665
3656
/// Use instead:
3666
3657
/// ```no_run
3667
- /// # #![allow(unused)]
3668
3658
/// let owned_string = "This is a string".to_owned();
3669
3659
/// owned_string.as_bytes()
3670
3660
/// # ;
0 commit comments