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/error.rs:435:1
        |
    435 | / impl<'a> IntoIterator for &'a Error {
    436 | |     type Item = Error;
    437 | |     type IntoIter = Iter<'a>;
    438 | |
    ...   |
    443 | |     }
    444 | | }
        | |_^
        |
        = 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`
        |
    435 +
    436 + impl Error {
    437 +     fn iter(&self) -> Iter<'a> {
    438 +         <&Self as IntoIterator>::into_iter(self)
    439 +     }
    440 + }
        |
  • Loading branch information
dtolnay committed Oct 7, 2023
1 parent 43632bf commit e203794
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 @@ -265,6 +265,7 @@
clippy::explicit_auto_deref,
clippy::if_not_else,
clippy::inherent_to_string,
clippy::into_iter_without_iter,
clippy::items_after_statements,
clippy::large_enum_variant,
clippy::let_underscore_untyped, // https://github.com/rust-lang/rust-clippy/issues/10410
Expand Down

0 comments on commit e203794

Please sign in to comment.