mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
cargo clippy --fix
This commit is contained in:
@@ -149,7 +149,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
|
||||
|
||||
for (name, files) in &image_files {
|
||||
// for (Entry<String,List<Path>> testImageGroup : imageFiles.entrySet()) {
|
||||
log::fine(format!("Starting Image Group {}", name));
|
||||
log::fine(format!("Starting Image Group {name}"));
|
||||
|
||||
let file_base_name = name; //testImageGroup.getKey();
|
||||
// let expectedText : String;
|
||||
@@ -408,7 +408,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
|
||||
misread_counts[x] += 1;
|
||||
}
|
||||
} else {
|
||||
log::fine(format!("could not read at rotation {}", rotation));
|
||||
log::fine(format!("could not read at rotation {rotation}"));
|
||||
}
|
||||
// try {
|
||||
// if (decode(bitmap, rotation, expectedText, expectedMetadata, false)) {
|
||||
@@ -432,7 +432,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
|
||||
try_harder_misread_counts[x] += 1;
|
||||
}
|
||||
} else {
|
||||
log::fine(format!("could not read at rotation {} w/TH", rotation));
|
||||
log::fine(format!("could not read at rotation {rotation} w/TH"));
|
||||
}
|
||||
// try {
|
||||
// if (decode(bitmap, rotation, expectedText, expectedMetadata, true)) {
|
||||
@@ -538,8 +538,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
|
||||
);
|
||||
assert!(
|
||||
try_harder_counts[x] >= test_rxing_result.get_try_harder_count() as usize,
|
||||
"Try harder, {}",
|
||||
label,
|
||||
"Try harder, {label}",
|
||||
);
|
||||
let label = format!(
|
||||
"Rotation {} degrees: Too many images misread",
|
||||
@@ -553,8 +552,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
|
||||
assert!(
|
||||
try_harder_misread_counts[x]
|
||||
<= test_rxing_result.get_max_try_harder_misreads() as usize,
|
||||
"Try harder, {}",
|
||||
label
|
||||
"Try harder, {label}"
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -613,8 +611,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
|
||||
let result_text = result.getText();
|
||||
if expected_text != result_text {
|
||||
log::info(format!(
|
||||
"Content mismatch: expected '{}' but got '{}'{}",
|
||||
expected_text, result_text, suffix
|
||||
"Content mismatch: expected '{expected_text}' but got '{result_text}'{suffix}"
|
||||
));
|
||||
return Ok(false);
|
||||
}
|
||||
@@ -626,8 +623,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
|
||||
let actual_value = result_metadata.get(key);
|
||||
if actual_value.is_none() || !(value == actual_value.unwrap()) {
|
||||
log::info(format!(
|
||||
"Metadata mismatch for key '{:?}': expected '{:?}' but got '{:?}'",
|
||||
key, value, actual_value
|
||||
"Metadata mismatch for key '{key:?}': expected '{value:?}' but got '{actual_value:?}'"
|
||||
));
|
||||
return Ok(false);
|
||||
}
|
||||
@@ -804,6 +800,6 @@ mod log {
|
||||
}
|
||||
|
||||
fn prn(level: &str, data: String) {
|
||||
println!("{} :: {}", level, data)
|
||||
println!("{level} :: {data}")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user