mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
refactor to use common result type
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
use crate::{
|
||||
common::BitMatrix,
|
||||
common::{BitMatrix, Result},
|
||||
qrcode::detector::{Detector, QRCodeDetectorResult},
|
||||
DecodeHintType, DecodeHintValue, DecodingHintDictionary, Exceptions,
|
||||
};
|
||||
@@ -37,10 +37,7 @@ impl<'a> MultiDetector<'_> {
|
||||
|
||||
// private static final DetectorRXingResult[] EMPTY_DETECTOR_RESULTS = new DetectorRXingResult[0];
|
||||
|
||||
pub fn detectMulti(
|
||||
&self,
|
||||
hints: &DecodingHintDictionary,
|
||||
) -> Result<Vec<QRCodeDetectorResult>, Exceptions> {
|
||||
pub fn detectMulti(&self, hints: &DecodingHintDictionary) -> Result<Vec<QRCodeDetectorResult>> {
|
||||
let image = self.0.getImage();
|
||||
let resultPointCallback = if let Some(DecodeHintValue::NeedResultPointCallback(cb)) =
|
||||
hints.get(&DecodeHintType::NEED_RESULT_POINT_CALLBACK)
|
||||
|
||||
Reference in New Issue
Block a user