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

@@ -17,7 +17,7 @@
use std::collections::HashMap;
use crate::{
common::{DecoderRXingResult, DetectorRXingResult},
common::{DecoderRXingResult, DetectorRXingResult, Result},
exceptions::Exceptions,
BarcodeFormat, BinaryBitmap, DecodeHintType, DecodeHintValue, RXingResult,
RXingResultMetadataType, RXingResultMetadataValue, Reader,
@@ -41,7 +41,7 @@ impl Reader for AztecReader {
* @throws NotFoundException if a Data Matrix code cannot be found
* @throws FormatException if a Data Matrix code cannot be decoded
*/
fn decode(&mut self, image: &mut BinaryBitmap) -> Result<RXingResult, Exceptions> {
fn decode(&mut self, image: &mut BinaryBitmap) -> Result<RXingResult> {
self.decode_with_hints(image, &HashMap::new())
}
@@ -49,7 +49,7 @@ impl Reader for AztecReader {
&mut self,
image: &mut BinaryBitmap,
hints: &HashMap<DecodeHintType, DecodeHintValue>,
) -> Result<RXingResult, Exceptions> {
) -> Result<RXingResult> {
// let notFoundException = None;
// let formatException = None;
let mut detector = Detector::new(image.getBlackMatrix());