mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
clippy fix
This commit is contained in:
@@ -36,15 +36,13 @@ pub fn detect_in_file_with_hints(
|
||||
);
|
||||
}
|
||||
|
||||
if !hints.contains_key(&DecodeHintType::TRY_HARDER) {
|
||||
hints.insert(DecodeHintType::TRY_HARDER, DecodeHintValue::TryHarder(true));
|
||||
}
|
||||
hints.entry(DecodeHintType::TRY_HARDER).or_insert(DecodeHintValue::TryHarder(true));
|
||||
|
||||
multi_format_reader.decode_with_hints(
|
||||
&mut BinaryBitmap::new(Rc::new(RefCell::new(HybridBinarizer::new(Box::new(
|
||||
BufferedImageLuminanceSource::new(img),
|
||||
))))),
|
||||
&hints,
|
||||
hints,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -62,15 +60,13 @@ pub fn detect_multiple_in_file_with_hints(
|
||||
let multi_format_reader = MultiFormatReader::default();
|
||||
let mut scanner = GenericMultipleBarcodeReader::new(multi_format_reader);
|
||||
|
||||
if !hints.contains_key(&DecodeHintType::TRY_HARDER) {
|
||||
hints.insert(DecodeHintType::TRY_HARDER, DecodeHintValue::TryHarder(true));
|
||||
}
|
||||
hints.entry(DecodeHintType::TRY_HARDER).or_insert(DecodeHintValue::TryHarder(true));
|
||||
|
||||
scanner.decode_multiple_with_hints(
|
||||
&mut BinaryBitmap::new(Rc::new(RefCell::new(HybridBinarizer::new(Box::new(
|
||||
BufferedImageLuminanceSource::new(img),
|
||||
))))),
|
||||
&hints,
|
||||
hints,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -99,15 +95,13 @@ pub fn detect_in_luma_with_hints(
|
||||
);
|
||||
}
|
||||
|
||||
if !hints.contains_key(&DecodeHintType::TRY_HARDER) {
|
||||
hints.insert(DecodeHintType::TRY_HARDER, DecodeHintValue::TryHarder(true));
|
||||
}
|
||||
hints.entry(DecodeHintType::TRY_HARDER).or_insert(DecodeHintValue::TryHarder(true));
|
||||
|
||||
multi_format_reader.decode_with_hints(
|
||||
&mut BinaryBitmap::new(Rc::new(RefCell::new(HybridBinarizer::new(Box::new(
|
||||
Luma8LuminanceSource::new(luma, width, height),
|
||||
))))),
|
||||
&hints,
|
||||
hints,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -128,14 +122,12 @@ pub fn detect_multiple_in_luma_with_hints(
|
||||
let multi_format_reader = MultiFormatReader::default();
|
||||
let mut scanner = GenericMultipleBarcodeReader::new(multi_format_reader);
|
||||
|
||||
if !hints.contains_key(&DecodeHintType::TRY_HARDER) {
|
||||
hints.insert(DecodeHintType::TRY_HARDER, DecodeHintValue::TryHarder(true));
|
||||
}
|
||||
hints.entry(DecodeHintType::TRY_HARDER).or_insert(DecodeHintValue::TryHarder(true));
|
||||
|
||||
scanner.decode_multiple_with_hints(
|
||||
&mut BinaryBitmap::new(Rc::new(RefCell::new(HybridBinarizer::new(Box::new(
|
||||
Luma8LuminanceSource::new(luma, width, height),
|
||||
))))),
|
||||
&hints,
|
||||
hints,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user