Skip to content

Commit

Permalink
Ignore into_iter_without_iter pedantic clippy lint
Browse files Browse the repository at this point in the history
    warning: `IntoIterator` implemented for a reference type without an `iter` method
      --> src/matrix.rs:83:1
       |
    83 | / impl<'a> IntoIterator for &'a Row {
    84 | |     type Item = u32;
    85 | |     type IntoIter = Copied<slice::Iter<'a, u32>>;
    86 | |
    ...  |
    89 | |     }
    90 | | }
       | |_^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_without_iter
       = note: `-W clippy::into-iter-without-iter` implied by `-W clippy::pedantic`
       = help: to override `-W clippy::pedantic` add `#[allow(clippy::into_iter_without_iter)]`
    help: consider implementing `iter`
       |
    83 +
    84 + impl Row {
    85 +     fn iter(&self) -> Copied<slice::Iter<'a, u32>> {
    86 +         <&Self as IntoIterator>::into_iter(self)
    87 +     }
    88 + }
       |
  • Loading branch information
dtolnay committed Oct 7, 2023
1 parent 775f216 commit 67f6f9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
clippy::cast_precision_loss,
clippy::cast_ptr_alignment,
clippy::cast_sign_loss,
clippy::into_iter_without_iter,
clippy::items_after_statements,
clippy::iter_not_returning_iterator, // https://github.com/rust-lang/rust-clippy/issues/8285
clippy::let_underscore_untyped,
Expand Down

0 comments on commit 67f6f9c

Please sign in to comment.