From 9b5cd9a1a478511f5d098845634eccc30586e17c Mon Sep 17 00:00:00 2001 From: Josh Holmer Date: Mon, 4 Jan 2021 16:12:46 -0500 Subject: [PATCH] Fix a new clippy lint --- src/reduction/bit_depth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reduction/bit_depth.rs b/src/reduction/bit_depth.rs index 24cb1e3d..49fee066 100644 --- a/src/reduction/bit_depth.rs +++ b/src/reduction/bit_depth.rs @@ -74,7 +74,7 @@ pub fn reduce_bit_depth(png: &PngImage, minimum_bits: usize) -> Option #[must_use] pub fn reduce_bit_depth_8_or_less(png: &PngImage, mut minimum_bits: usize) -> Option { - assert!(minimum_bits >= 1 && minimum_bits < 8); + assert!((1..8).contains(&minimum_bits)); let mut reduced = BitVec::with_capacity(png.data.len() * 8); let bit_depth: usize = png.ihdr.bit_depth.as_u8() as usize; if minimum_bits >= bit_depth {