@@ -749,15 +749,13 @@ declare_clippy_lint! {
749749 ///
750750 /// ### Example
751751 /// ```no_run
752- /// # #![allow(unused)]
753752 /// (0_i32..10)
754753 /// .filter(|n| n.checked_add(1).is_some())
755754 /// .map(|n| n.checked_add(1).unwrap());
756755 /// ```
757756 ///
758757 /// Use instead:
759758 /// ```no_run
760- /// # #[allow(unused)]
761759 /// (0_i32..10).filter_map(|n| n.checked_add(1));
762760 /// ```
763761 #[ clippy:: version = "1.51.0" ]
@@ -850,7 +848,6 @@ declare_clippy_lint! {
850848 ///
851849 /// ### Example
852850 /// ```no_run
853- /// # #![allow(unused)]
854851 /// let vec = vec![1];
855852 /// vec.iter().find(|x| **x == 0).is_some();
856853 ///
@@ -862,7 +859,6 @@ declare_clippy_lint! {
862859 /// let vec = vec![1];
863860 /// vec.iter().any(|x| *x == 0);
864861 ///
865- /// # #[allow(unused)]
866862 /// !"hello world".contains("world");
867863 /// ```
868864 #[ clippy:: version = "pre 1.29.0" ]
@@ -1505,7 +1501,6 @@ declare_clippy_lint! {
15051501 ///
15061502 /// ### Example
15071503 /// ```no_run
1508- /// # #[allow(unused)]
15091504 /// (0..3).fold(false, |acc, x| acc || x > 2);
15101505 /// ```
15111506 ///
@@ -2008,13 +2003,11 @@ declare_clippy_lint! {
20082003 ///
20092004 /// ### Example
20102005 /// ```no_run
2011- /// # #[allow(unused)]
20122006 /// "Hello".bytes().nth(3);
20132007 /// ```
20142008 ///
20152009 /// Use instead:
20162010 /// ```no_run
2017- /// # #[allow(unused)]
20182011 /// "Hello".as_bytes().get(3);
20192012 /// ```
20202013 #[ clippy:: version = "1.52.0" ]
@@ -2059,7 +2052,6 @@ declare_clippy_lint! {
20592052 ///
20602053 /// ### Example
20612054 /// ```no_run
2062- /// # #![allow(unused)]
20632055 /// let some_vec = vec![0, 1, 2, 3];
20642056 ///
20652057 /// some_vec.iter().count();
@@ -3656,15 +3648,13 @@ declare_clippy_lint! {
36563648 ///
36573649 /// ### Example
36583650 /// ```no_run
3659- /// # #![allow(unused)]
36603651 /// let owned_string = "This is a string".to_owned();
36613652 /// owned_string.as_str().as_bytes()
36623653 /// # ;
36633654 /// ```
36643655 ///
36653656 /// Use instead:
36663657 /// ```no_run
3667- /// # #![allow(unused)]
36683658 /// let owned_string = "This is a string".to_owned();
36693659 /// owned_string.as_bytes()
36703660 /// # ;
0 commit comments