From ae9c1f7847da44967241bd34fc501e2e2a1b08fc Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Wed, 13 Sep 2023 20:45:50 +0700 Subject: [PATCH] clippy: Remove extra Iterator bounds. (#2475) `Iterator` is a supertrait of `ExactSizeIterator`, so specifying `ExactSizeIterator` is enough. --- src/front/wgsl/error.rs | 2 +- src/span.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/front/wgsl/error.rs b/src/front/wgsl/error.rs index 7ce795fa08..f7bed6cdf9 100644 --- a/src/front/wgsl/error.rs +++ b/src/front/wgsl/error.rs @@ -17,7 +17,7 @@ pub struct ParseError { } impl ParseError { - pub fn labels(&self) -> impl Iterator + ExactSizeIterator + '_ { + pub fn labels(&self) -> impl ExactSizeIterator + '_ { self.labels .iter() .map(|&(span, ref msg)| (span, msg.as_ref())) diff --git a/src/span.rs b/src/span.rs index 90bf3d174e..0bc97ff460 100644 --- a/src/span.rs +++ b/src/span.rs @@ -181,7 +181,7 @@ impl WithSpan { } /// Iterator over stored [`SpanContext`]s. - pub fn spans(&self) -> impl Iterator + ExactSizeIterator { + pub fn spans(&self) -> impl ExactSizeIterator { #[cfg(feature = "span")] return self.spans.iter(); #[cfg(not(feature = "span"))]