From 5bd0476eddce5669d8982a836c92d1ee8d5ceb42 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 8 Dec 2024 16:05:41 +0900 Subject: [PATCH] Fix clippy::needless_lifetimes warning ``` 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 Clone for Iter<'_, T> { | ``` --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8317c5f..7fade62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -209,7 +209,7 @@ pub struct Iter<'a, T> { len: usize, } -impl<'a, T> Clone for Iter<'a, T> { +impl Clone for Iter<'_, T> { fn clone(&self) -> Self { Self { entries: self.entries.clone(),