Apply clippy::manual_let_else

This commit is contained in:
Luracasmus 2025-11-22 20:08:02 +01:00 committed by Alejandro González
parent 508e47e543
commit 1028b2a00d
No known key found for this signature in database

View file

@ -133,9 +133,8 @@ impl PngData {
if idat_data.is_empty() {
return Err(PngError::ChunkMissing("IDAT"));
}
let ihdr_chunk = match key_chunks.remove(b"IHDR") {
Some(ihdr) => ihdr,
None => return Err(PngError::ChunkMissing("IHDR")),
let Some(ihdr_chunk) = key_chunks.remove(b"IHDR") else {
return Err(PngError::ChunkMissing("IHDR"));
};
let ihdr = parse_ihdr_chunk(
&ihdr_chunk,