From 6f544d321325ffe8a185eb07ea14a6a3ec90d6f2 Mon Sep 17 00:00:00 2001 From: Henry Schimke Date: Tue, 3 Jan 2023 06:45:04 -0600 Subject: [PATCH] added box::default for upcean reader --- src/oned/multi_format_upc_ean_reader.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/oned/multi_format_upc_ean_reader.rs b/src/oned/multi_format_upc_ean_reader.rs index 5b196c5..529689f 100644 --- a/src/oned/multi_format_upc_ean_reader.rs +++ b/src/oned/multi_format_upc_ean_reader.rs @@ -46,22 +46,22 @@ impl MultiFormatUPCEANReader { // (Collection) hints.get(DecodeHintType.POSSIBLE_FORMATS); // Collection readers = new ArrayList<>(); if possibleFormats.contains(&BarcodeFormat::EAN_13) { - readers.push(Box::new(EAN13Reader::default())); + readers.push(Box::::default()); } else if possibleFormats.contains(&BarcodeFormat::UPC_A) { - readers.push(Box::new(UPCAReader::default())); + readers.push(Box::::default()); } if possibleFormats.contains(&BarcodeFormat::EAN_8) { - readers.push(Box::new(EAN8Reader::default())); + readers.push(Box::::default()); } if possibleFormats.contains(&BarcodeFormat::UPC_E) { - readers.push(Box::new(UPCEReader::default())); + readers.push(Box::::default()); } } if readers.is_empty() { - readers.push(Box::new(EAN13Reader::default())); + readers.push(Box::::default()); // UPC-A is covered by EAN-13 - readers.push(Box::new(EAN8Reader::default())); - readers.push(Box::new(UPCEReader::default())); + readers.push(Box::::default()); + readers.push(Box::::default()); } Self(readers)