refactor to use common result type

This commit is contained in:
Vukašin Stepanović
2023-02-14 22:56:03 +00:00
parent 145cf704fe
commit 8ee616d96b
160 changed files with 829 additions and 901 deletions

View File

@@ -571,7 +571,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
expected_text: &str,
expected_metadata: &HashMap<RXingResultMetadataType, RXingResultMetadataValue>,
try_harder: bool,
) -> Result<bool, rxing::Exceptions> {
) -> Result<bool> {
let suffix = format!(
" ({}rotation: {})",
if try_harder { "try harder, " } else { "" },
@@ -756,7 +756,7 @@ impl<T: MultipleBarcodeReader + Reader> PDF417MultiImageSpanAbstractBlackBoxTest
source: &mut BinaryBitmap,
try_harder: bool,
barcode_reader: &mut T,
) -> Result<Vec<RXingResult>, Exceptions> {
) -> Result<Vec<RXingResult>> {
let mut hints = HashMap::new(); //new EnumMap<>(DecodeHintType.class);
if try_harder {
hints.insert(DecodeHintType::TRY_HARDER, DecodeHintValue::TryHarder(true));