Merge branch 'main' of github.com:hschimke/rxing

This commit is contained in:
Henry Schimke
2023-01-25 09:38:04 -06:00

View File

@@ -290,19 +290,21 @@ fn getBarcodeMetadata<T: DetectionRXingResultRowIndicatorColumn>(
// return if rightRowIndicatorColumn.is_none() {None} else {rightRowIndicatorColumn.getBarcodeMetadata()}; // return if rightRowIndicatorColumn.is_none() {None} else {rightRowIndicatorColumn.getBarcodeMetadata()};
// } // }
let rightBarcodeMetadata = if rightRowIndicatorColumn.is_none() let rightBarcodeMetadata = if rightRowIndicatorColumn.is_none() {
|| rightRowIndicatorColumn
.as_mut()
.unwrap()
.getBarcodeMetadata()
.is_none()
{
return leftBarcodeMetadata; return leftBarcodeMetadata;
} else if let Some(mdt) = rightRowIndicatorColumn
.as_mut()
.unwrap()
.getBarcodeMetadata()
{
mdt
// rightRowIndicatorColumn
// .as_mut()
// .unwrap()
// .getBarcodeMetadata()
// .unwrap()
} else { } else {
rightRowIndicatorColumn return leftBarcodeMetadata;
.as_mut()
.unwrap()
.getBarcodeMetadata()
}; };
// if rightRowIndicatorColumn.is_none() || // if rightRowIndicatorColumn.is_none() ||
// (rightBarcodeMetadata = rightRowIndicatorColumn.getBarcodeMetadata()).is_none() { // (rightBarcodeMetadata = rightRowIndicatorColumn.getBarcodeMetadata()).is_none() {
@@ -312,17 +314,13 @@ fn getBarcodeMetadata<T: DetectionRXingResultRowIndicatorColumn>(
leftBarcodeMetadata?; leftBarcodeMetadata?;
if leftBarcodeMetadata.as_ref().unwrap().getColumnCount() if leftBarcodeMetadata.as_ref().unwrap().getColumnCount()
!= rightBarcodeMetadata.as_ref().unwrap().getColumnCount() != rightBarcodeMetadata.getColumnCount()
&& leftBarcodeMetadata && leftBarcodeMetadata
.as_ref() .as_ref()
.unwrap() .unwrap()
.getErrorCorrectionLevel() .getErrorCorrectionLevel()
!= rightBarcodeMetadata != rightBarcodeMetadata.getErrorCorrectionLevel()
.as_ref() && leftBarcodeMetadata.as_ref().unwrap().getRowCount() != rightBarcodeMetadata.getRowCount()
.unwrap()
.getErrorCorrectionLevel()
&& leftBarcodeMetadata.as_ref().unwrap().getRowCount()
!= rightBarcodeMetadata.as_ref().unwrap().getRowCount()
{ {
return None; return None;
} }