Skip to content

Commit

Permalink
Ignore iter_without_into_iter pedantic clippy lint
Browse files Browse the repository at this point in the history
    warning: `iter` method without an `IntoIterator` impl for `&RcVec<T>`
      --> src/rcvec.rs:33:5
       |
    33 | /     pub fn iter(&self) -> slice::Iter<T> {
    34 | |         self.inner.iter()
    35 | |     }
       | |_____^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_without_into_iter
       = note: `-W clippy::iter-without-into-iter` implied by `-W clippy::pedantic`
       = help: to override `-W clippy::pedantic` add `#[allow(clippy::iter_without_into_iter)]`
    help: consider implementing `IntoIterator` for `&RcVec<T>`
       |
    24 +
    25 + impl IntoIterator for &RcVec<T> {
    26 +     type IntoIter = std::slice::Iter<'_, T>;
    27 +     type Iter = &T;
    28 +     fn into_iter() -> Self::IntoIter {
    29 +         self.iter()
    30 +     }
    31 + }
       |
  • Loading branch information
dtolnay committed Oct 7, 2023
1 parent a3e94df commit 4d8410e
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 @@ -95,6 +95,7 @@
clippy::cast_possible_truncation,
clippy::doc_markdown,
clippy::items_after_statements,
clippy::iter_without_into_iter,
clippy::let_underscore_untyped,
clippy::manual_assert,
clippy::manual_range_contains,
Expand Down

0 comments on commit 4d8410e

Please sign in to comment.