Skip to content

Commit

Permalink
clippy: Remove extra Iterator bounds. (#2475)
Browse files Browse the repository at this point in the history
`Iterator` is a supertrait of `ExactSizeIterator`, so specifying `ExactSizeIterator` is enough.
  • Loading branch information
waywardmonkeys authored Sep 13, 2023
1 parent d2c29f0 commit ae9c1f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/front/wgsl/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct ParseError {
}

impl ParseError {
pub fn labels(&self) -> impl Iterator<Item = (Span, &str)> + ExactSizeIterator + '_ {
pub fn labels(&self) -> impl ExactSizeIterator<Item = (Span, &str)> + '_ {
self.labels
.iter()
.map(|&(span, ref msg)| (span, msg.as_ref()))
Expand Down
2 changes: 1 addition & 1 deletion src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl<E> WithSpan<E> {
}

/// Iterator over stored [`SpanContext`]s.
pub fn spans(&self) -> impl Iterator<Item = &SpanContext> + ExactSizeIterator {
pub fn spans(&self) -> impl ExactSizeIterator<Item = &SpanContext> {
#[cfg(feature = "span")]
return self.spans.iter();
#[cfg(not(feature = "span"))]
Expand Down

0 comments on commit ae9c1f7

Please sign in to comment.