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

@@ -62,7 +62,7 @@ impl Reader for MaxiCodeReader {
// Note that MaxiCode reader effectively always assumes PURE_BARCODE mode
// and can't detect it in an image
let bits = Self::extractPureBits(image.getBlackMatrix())?;
let decoderRXingResult = decoder::decode_with_hints(bits, &hints)?;
let decoderRXingResult = decoder::decode_with_hints(bits, hints)?;
let mut result = RXingResult::new(
decoderRXingResult.getText(),
decoderRXingResult.getRawBytes().clone(),
@@ -97,7 +97,7 @@ impl MaxiCodeReader {
fn extractPureBits(image: &BitMatrix) -> Result<BitMatrix, Exceptions> {
let enclosingRectangleOption = image.getEnclosingRectangle();
if enclosingRectangleOption.is_none() {
return Err(Exceptions::NotFoundException("".to_owned()));
return Err(Exceptions::NotFoundException(None));
}
let enclosingRectangle = enclosingRectangleOption.unwrap();