Skip to content

Commit

Permalink
Fix clippy::needless_lifetimes warning (#147)
Browse files Browse the repository at this point in the history
```
error: the following explicit lifetimes could be elided: 'a
   --> src/lib.rs:212:6
    |
212 | impl<'a, T> Clone for Iter<'a, T> {
    |      ^^                    ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
    |
212 - impl<'a, T> Clone for Iter<'a, T> {
212 + impl<T> Clone for Iter<'_, T> {
    |
```
  • Loading branch information
taiki-e authored Dec 8, 2024
1 parent fecdd68 commit 30e8dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ pub struct Iter<'a, T> {
len: usize,
}

impl<'a, T> Clone for Iter<'a, T> {
impl<T> Clone for Iter<'_, T> {
fn clone(&self) -> Self {
Self {
entries: self.entries.clone(),
Expand Down

0 comments on commit 30e8dd7

Please # to comment.