clippy fix

This commit is contained in:
Henry
2023-04-28 19:41:23 -05:00
parent 2afc6be3dc
commit ef999a4eb0
36 changed files with 122 additions and 137 deletions

View File

@@ -113,7 +113,9 @@ impl<LS: LuminanceSource> HybridBinarizer<LS> {
let source = ghb.get_luminance_source();
let width = source.get_width();
let height = source.get_height();
let matrix = if width >= MINIMUM_DIMENSION && height >= MINIMUM_DIMENSION {
// dbg!(matrix.to_string());
if width >= MINIMUM_DIMENSION && height >= MINIMUM_DIMENSION {
let luminances = source.get_matrix();
let mut sub_width = width >> BLOCK_SIZE_POWER;
if (width & BLOCK_SIZE_MASK) != 0 {
@@ -146,9 +148,7 @@ impl<LS: LuminanceSource> HybridBinarizer<LS> {
// If the image is too small, fall back to the global histogram approach.
let m = ghb.get_black_matrix()?;
Ok(m.clone())
};
// dbg!(matrix.to_string());
matrix
}
}
/**