diff --git a/Cargo.toml b/Cargo.toml index 0df78ad..a7d4275 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ quick-error = "2.0.1" # Rename to avoid confusion with the feature name. fax34 = { package = "fax", version = "0.2.6", optional = true } flate2 = { version = "1.0.20", optional = true } -weezl = { version = "0.1.10", optional = true } +weezl = { version = "0.2.1", optional = true } zstd = { version = "0.13", optional = true } zune-jpeg = { version = "0.5.1", optional = true } image-webp = {version = "0.2.4", optional = true } diff --git a/src/decoder/logluv.rs b/src/decoder/logluv.rs index 7744736..ff3e742 100644 --- a/src/decoder/logluv.rs +++ b/src/decoder/logluv.rs @@ -92,11 +92,7 @@ fn packbits_decode( let mut i = 0; let mut code = [0u8; 1]; - loop { - let Some(pixels) = buf.get_mut(i..) else { - break; - }; - + while let Some(pixels) = buf.get_mut(i..) { if pixels.is_empty() { break; }