Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia committed Aug 9, 2023
1 parent 82d6e49 commit d84a831
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/codecs/webp/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl<W: Write> WebPEncoder<W> {
current[i] = current[i].wrapping_sub(prev[i]);
}
}
for i in (channels..row_bytes as usize).rev() {
for i in (channels..row_bytes).rev() {
pixels[i] = pixels[i].wrapping_sub(pixels[i - channels]);
}
if is_alpha {
Expand Down Expand Up @@ -304,9 +304,9 @@ impl<W: Write> WebPEncoder<W> {
vec![0u16; 256],
vec![0u16; 256],
];
for i in 0..4 {
for j in 0..256 {
codes[i][j] = (j as u8).reverse_bits() as u16;
for code in codes.iter_mut() {
for i in 0..256 {
code[i] = (i as u8).reverse_bits() as u16;
}
}

Expand Down Expand Up @@ -450,7 +450,7 @@ impl<W: Write> WebPEncoder<W> {
}

self.writer.write_all(&encoded)?;
return Ok(());
Ok(())
}

/// Encode image data with the indicated color type.
Expand Down

0 comments on commit d84a831

Please sign in to comment.