Implement clippy suggestions

This commit is contained in:
Henry Schimke
2023-01-04 14:48:16 -06:00
parent c65eadf102
commit 48287631dd
196 changed files with 2465 additions and 2574 deletions

View File

@@ -53,8 +53,7 @@ impl Reader for AztecReader {
// let notFoundException = None;
// let formatException = None;
let mut detector = Detector::new(image.getBlackMatrix());
let points;
let decoderRXingResult: DecoderRXingResult;
// try {
let detectorRXingResult = if let Ok(det) = detector.detect(false) {
@@ -62,13 +61,11 @@ impl Reader for AztecReader {
} else if let Ok(det) = detector.detect(true) {
det
} else {
return Err(Exceptions::NotFoundException(
"barcode not found".to_owned(),
));
return Err(Exceptions::NotFoundException(None));
};
points = detectorRXingResult.getPoints();
decoderRXingResult = decoder::decode(&detectorRXingResult)?;
let points = detectorRXingResult.getPoints();
let decoderRXingResult: DecoderRXingResult = decoder::decode(&detectorRXingResult)?;
// } catch (NotFoundException e) {
// notFoundException = e;
// } catch (FormatException e) {