fairly major reorganization and clippy cleanup

This commit is contained in:
Henry
2023-01-10 15:28:36 -06:00
parent 59183a5383
commit a32de48f34
42 changed files with 199 additions and 166 deletions

View File

@@ -50,12 +50,14 @@ impl BarcodeValue {
let mut result = Vec::new();
for (key, value) in &self.0 {
// for (Entry<Integer,Integer> entry : values.entrySet()) {
if *value as i32 > maxConfidence {
maxConfidence = *value as i32;
result.clear();
result.push(*key);
} else if *value as i32 == maxConfidence {
result.push(*key);
match (*value as i32).cmp(&maxConfidence) {
std::cmp::Ordering::Greater => {
maxConfidence = *value as i32;
result.clear();
result.push(*key);
}
std::cmp::Ordering::Equal => result.push(*key),
std::cmp::Ordering::Less => {}
}
}

View File

@@ -648,6 +648,7 @@ fn getStartColumn(
}
}
#[allow(clippy::too_many_arguments)]
fn detectCodeword(
image: &BitMatrix,
minColumn: u32,