tests built

This commit is contained in:
Henry Schimke
2022-12-23 10:28:11 -06:00
parent d7c0c67196
commit f07d546083
8 changed files with 532 additions and 480 deletions

View File

@@ -115,7 +115,7 @@ pub fn decode_bitmatrix_with_hints(
let mut result = decode_bitmatrix_parser_with_hints(&mut parser, hints)?;
// Success! Notify the caller that the code was mirrored.
result.setOther(Rc::new(QRCodeDecoderMetaData::new(true)));
result.setOther(Some(Rc::new(QRCodeDecoderMetaData::new(true))));
Ok(result)
};

View File

@@ -74,15 +74,15 @@ impl Reader for QRCodeReader {
}
// If the code was mirrored: swap the bottom-left and the top-right points.
if decoderRXingResult.getOther().is::<QRCodeDecoderMetaData>() {
if let Some(other) = decoderRXingResult.getOther() {
if other.is::<QRCodeDecoderMetaData>() {
// if (decoderRXingResult.getOther() instanceof QRCodeDecoderMetaData) {
decoderRXingResult
.getOther()
other
.downcast_ref::<QRCodeDecoderMetaData>()
.unwrap()
.applyMirroredCorrection(&mut points);
// ((QRCodeDecoderMetaData) decoderRXingResult.getOther()).applyMirroredCorrection(points);
}
}}
let mut result = RXingResult::new(
decoderRXingResult.getText(),