@@ -290,19 +290,21 @@ fn getBarcodeMetadata<T: DetectionRXingResultRowIndicatorColumn>(
290
290
// return if rightRowIndicatorColumn.is_none() {None} else {rightRowIndicatorColumn.getBarcodeMetadata()};
291
291
// }
292
292
293
- let rightBarcodeMetadata = if rightRowIndicatorColumn. is_none ( )
294
- || rightRowIndicatorColumn
295
- . as_mut ( )
296
- . unwrap ( )
297
- . getBarcodeMetadata ( )
298
- . is_none ( )
299
- {
293
+ let rightBarcodeMetadata = if rightRowIndicatorColumn. is_none ( ) {
300
294
return leftBarcodeMetadata;
295
+ } else if let Some ( mdt) = rightRowIndicatorColumn
296
+ . as_mut ( )
297
+ . unwrap ( )
298
+ . getBarcodeMetadata ( )
299
+ {
300
+ mdt
301
+ // rightRowIndicatorColumn
302
+ // .as_mut()
303
+ // .unwrap()
304
+ // .getBarcodeMetadata()
305
+ // .unwrap()
301
306
} else {
302
- rightRowIndicatorColumn
303
- . as_mut ( )
304
- . unwrap ( )
305
- . getBarcodeMetadata ( )
307
+ return leftBarcodeMetadata;
306
308
} ;
307
309
// if rightRowIndicatorColumn.is_none() ||
308
310
// (rightBarcodeMetadata = rightRowIndicatorColumn.getBarcodeMetadata()).is_none() {
@@ -312,17 +314,13 @@ fn getBarcodeMetadata<T: DetectionRXingResultRowIndicatorColumn>(
312
314
leftBarcodeMetadata?;
313
315
314
316
if leftBarcodeMetadata. as_ref ( ) . unwrap ( ) . getColumnCount ( )
315
- != rightBarcodeMetadata. as_ref ( ) . unwrap ( ) . getColumnCount ( )
317
+ != rightBarcodeMetadata. getColumnCount ( )
316
318
&& leftBarcodeMetadata
317
319
. as_ref ( )
318
320
. unwrap ( )
319
321
. getErrorCorrectionLevel ( )
320
- != rightBarcodeMetadata
321
- . as_ref ( )
322
- . unwrap ( )
323
- . getErrorCorrectionLevel ( )
324
- && leftBarcodeMetadata. as_ref ( ) . unwrap ( ) . getRowCount ( )
325
- != rightBarcodeMetadata. as_ref ( ) . unwrap ( ) . getRowCount ( )
322
+ != rightBarcodeMetadata. getErrorCorrectionLevel ( )
323
+ && leftBarcodeMetadata. as_ref ( ) . unwrap ( ) . getRowCount ( ) != rightBarcodeMetadata. getRowCount ( )
326
324
{
327
325
return None ;
328
326
}
0 commit comments