Apply clippy::ignored_unit_patterns
This commit is contained in:
parent
c399dffff5
commit
0cf0da397f
2 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ pub fn deflate(data: &[u8], options: zopfli::Options) -> PngResult<Vec<u8>> {
|
|||
// Since Rust v1.74, passing &[u8] directly into zopfli causes a regression in compressed size
|
||||
// for some files. Wrapping the slice in another Read implementer such as Box fixes it for now.
|
||||
match zopfli::compress(options, zopfli::Format::Zlib, Box::new(data), &mut output) {
|
||||
Ok(_) => (),
|
||||
Ok(()) => (),
|
||||
Err(_) => return Err(PngError::new("Failed to compress in zopfli")),
|
||||
}
|
||||
output.shrink_to_fit();
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ impl PngImage {
|
|||
last_pass = line.pass;
|
||||
}
|
||||
last_line.resize(line.data.len(), 0);
|
||||
let filter = RowFilter::try_from(line.filter).map_err(|_| PngError::InvalidData)?;
|
||||
let filter = RowFilter::try_from(line.filter).map_err(|()| PngError::InvalidData)?;
|
||||
filter.unfilter_line(bpp, line.data, &last_line, &mut unfiltered_buf);
|
||||
unfiltered.extend_from_slice(&unfiltered_buf);
|
||||
std::mem::swap(&mut last_line, &mut unfiltered_buf);
|
||||
|
|
|
|||
Loading…
Reference in a new issue