Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Dec 31, 2024
1 parent f0a1cd2 commit df31d20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reduction/bit_depth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn reduced_bit_depth_16_to_8(png: &PngImage, force_scale: bool) -> Option<Pn
}

Some(PngImage {
data: png.data.iter().step_by(2).cloned().collect(),
data: png.data.iter().step_by(2).copied().collect(),
ihdr: IhdrData {
color_type: png.ihdr.color_type.clone(),
bit_depth: BitDepth::Eight,
Expand Down Expand Up @@ -207,7 +207,7 @@ pub fn expanded_bit_depth_to_8(png: &PngImage) -> Option<PngImage> {
{
let mut bits = bit_depth;
while bits < 8 {
trans = trans << bits | trans;
trans = (trans << bits) | trans;
bits <<= 1;
}
ColorType::Grayscale {
Expand Down

0 comments on commit df31d20

Please sign in to comment.