Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy fixes #2338

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl<'a> Frames<'a> {
}
}

impl<'a> Iterator for Frames<'a> {
impl Iterator for Frames<'_> {
type Item = ImageResult<Frame>;
fn next(&mut self) -> Option<ImageResult<Frame>> {
self.iterator.next()
Expand Down
2 changes: 1 addition & 1 deletion src/codecs/bmp/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl<'a, W: Write + 'a> BmpEncoder<'a, W> {
}
}

impl<'a, W: Write> ImageEncoder for BmpEncoder<'a, W> {
impl<W: Write> ImageEncoder for BmpEncoder<'_, W> {
#[track_caller]
fn write_image(
mut self,
Expand Down
4 changes: 2 additions & 2 deletions src/codecs/hdr/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl<'a> RunIterator<'a> {
}
}

impl<'a> Iterator for RunIterator<'a> {
impl Iterator for RunIterator<'_> {
type Item = RunOrNot;

fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -179,7 +179,7 @@ impl<'a> NorunCombineIterator<'a> {
}

// Combines sequential noruns produced by RunIterator
impl<'a> Iterator for NorunCombineIterator<'a> {
impl Iterator for NorunCombineIterator<'_> {
type Item = RunOrNot;
fn next(&mut self) -> Option<Self::Item> {
loop {
Expand Down
4 changes: 2 additions & 2 deletions src/codecs/pnm/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ impl<'a> CheckedHeader<'a> {

struct SampleWriter<'a>(&'a mut dyn Write);

impl<'a> SampleWriter<'a> {
impl SampleWriter<'_> {
fn write_samples_ascii<V>(self, samples: V) -> io::Result<()>
where
V: Iterator,
Expand Down Expand Up @@ -633,7 +633,7 @@ impl<'a> From<&'a [u16]> for FlatSamples<'a> {
}
}

impl<'a> TupleEncoding<'a> {
impl TupleEncoding<'_> {
fn write_image(&self, writer: &mut dyn Write) -> ImageResult<()> {
match *self {
TupleEncoding::PbmBits {
Expand Down
2 changes: 1 addition & 1 deletion src/codecs/pnm/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl PnmHeader {
..
} => {
struct TupltypeWriter<'a>(&'a Option<ArbitraryTuplType>);
impl<'a> fmt::Display for TupltypeWriter<'a> {
impl fmt::Display for TupltypeWriter<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.0 {
Some(tt) => writeln!(f, "TUPLTYPE {}", tt.name()),
Expand Down
2 changes: 1 addition & 1 deletion src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ pub struct Pixels<'a, I: ?Sized + 'a> {
height: u32,
}

impl<'a, I: GenericImageView> Iterator for Pixels<'a, I> {
impl<I: GenericImageView> Iterator for Pixels<'_, I> {
type Item = (u32, u32, I::Pixel);

fn next(&mut self) -> Option<(u32, u32, I::Pixel)> {
Expand Down
Loading