Merge branch 'main' into pr/exception_helpers

This commit is contained in:
Vukašin Stepanović
2023-02-16 07:15:51 +00:00
161 changed files with 900 additions and 933 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());