From c926707c9fcb8e5618caf8c5881a557f19211cec Mon Sep 17 00:00:00 2001 From: Gwen Lg Date: Sun, 16 Jun 2024 14:49:58 +0200 Subject: [PATCH] enable clippy::use_self lint and do fixes fix: unnecessary structure name repetition for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 62c40be..eccce1c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,7 @@ // enable additionnal lints #![warn(clippy::doc_markdown)] #![warn(clippy::ignored_unit_patterns)] +#![warn(clippy::use_self)] use core::iter; @@ -78,7 +79,7 @@ where /// // TODO: Would it be ok if it generated more elements? pub unsafe fn from_iter>(i: II) -> Self { - IteratorFixed { + Self { inner: i.into_iter(), } }