mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-29 02:03:35 +00:00
clippy: Remove extra Iterator bounds. (#2475)
`Iterator` is a supertrait of `ExactSizeIterator`, so specifying `ExactSizeIterator` is enough.
This commit is contained in:
parent
d2c29f012e
commit
ae9c1f7847
@ -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()))
|
||||
|
@ -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"))]
|
||||
|
Loading…
Reference in New Issue
Block a user