fix potential unwrap on none

This commit is contained in:
Henry Schimke
2023-01-06 10:56:00 -06:00
parent 7996f42c64
commit 6d41475786
5 changed files with 24 additions and 19 deletions

View File

@@ -309,6 +309,10 @@ fn getBarcodeMetadata<T: DetectionRXingResultRowIndicatorColumn>(
// return leftBarcodeMetadata;
// }
if leftBarcodeMetadata.is_none() {
return None;
}
if leftBarcodeMetadata.as_ref().unwrap().getColumnCount()
!= rightBarcodeMetadata.as_ref().unwrap().getColumnCount()
&& leftBarcodeMetadata