mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
cleanup more warnings and deprecated function use
This commit is contained in:
@@ -405,7 +405,7 @@ impl Code128Reader {
|
||||
return Ok([patternStart, i, bestMatch as usize]);
|
||||
}
|
||||
patternStart += (counters[0] + counters[1]) as usize;
|
||||
|
||||
|
||||
counters.copy_within(2..(counterPosition - 1 + 2), 0);
|
||||
// System.arraycopy(counters, 2, counters, 0, counterPosition - 1);
|
||||
counters[counterPosition - 1] = 0;
|
||||
|
||||
@@ -229,7 +229,7 @@ impl Code39Reader {
|
||||
// return new int[]{patternStart, i};
|
||||
}
|
||||
patternStart += (counters[0] + counters[1]) as usize;
|
||||
|
||||
|
||||
counters.copy_within(2..(counterPosition - 1 + 2), 0);
|
||||
// System.arraycopy(counters, 2, counters, 0, counterPosition - 1);
|
||||
counters[counterPosition - 1] = 0;
|
||||
|
||||
@@ -171,7 +171,7 @@ impl Code93Reader {
|
||||
return Ok([patternStart, i]);
|
||||
}
|
||||
patternStart += (theCounters[0] + theCounters[1]) as usize;
|
||||
|
||||
|
||||
theCounters.copy_within(2..(counterPosition - 1 + 2), 0);
|
||||
// System.arraycopy(theCounters, 2, theCounters, 0, counterPosition - 1);
|
||||
theCounters[counterPosition - 1] = 0;
|
||||
|
||||
@@ -218,11 +218,7 @@ impl Code93Writer {
|
||||
*/
|
||||
#[cfg(test)]
|
||||
mod Code93WriterTestCase {
|
||||
use crate::{
|
||||
common::BitMatrixTestCase,
|
||||
oned::{Code93Writer},
|
||||
BarcodeFormat, Writer,
|
||||
};
|
||||
use crate::{common::BitMatrixTestCase, oned::Code93Writer, BarcodeFormat, Writer};
|
||||
|
||||
#[test]
|
||||
fn testEncode() {
|
||||
|
||||
@@ -384,7 +384,7 @@ impl ITFReader {
|
||||
return Ok([patternStart, x]);
|
||||
}
|
||||
patternStart += (counters[0] + counters[1]) as usize;
|
||||
|
||||
|
||||
counters.copy_within(2..(counterPosition - 1 + 2), 0);
|
||||
// System.arraycopy(counters, 2, counters, 0, counterPosition - 1);
|
||||
counters[counterPosition - 1] = 0;
|
||||
|
||||
@@ -22,9 +22,9 @@ use crate::Reader;
|
||||
|
||||
use super::EAN13Reader;
|
||||
use super::EAN8Reader;
|
||||
use super::STAND_IN;
|
||||
use super::UPCAReader;
|
||||
use super::UPCEReader;
|
||||
use super::STAND_IN;
|
||||
use super::{OneDReader, UPCEANReader};
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,44 +24,62 @@
|
||||
* http://www.piramidepse.com/
|
||||
*/
|
||||
|
||||
use crate::oned::rss::expanded::{
|
||||
binary_util,
|
||||
decoders::{abstract_expanded_decoder::createDecoder, AbstractExpandedDecoder},
|
||||
};
|
||||
use crate::oned::rss::expanded::{binary_util, decoders::abstract_expanded_decoder::createDecoder};
|
||||
|
||||
/**
|
||||
* @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es)
|
||||
*/
|
||||
|
||||
pub const numeric10: &str = "..X..XX";
|
||||
pub const numeric12: &str = "..X.X.X";
|
||||
pub const numeric1FNC1: &str = "..XXX.X";
|
||||
#[allow(dead_code)]
|
||||
pub const NUMERIC10: &str = "..X..XX";
|
||||
#[allow(dead_code)]
|
||||
pub const NUMERIC12: &str = "..X.X.X";
|
||||
#[allow(dead_code)]
|
||||
pub const NUMERIC1_FNC1: &str = "..XXX.X";
|
||||
// static final String numericFNC11 = "XXX.XXX";
|
||||
|
||||
pub const numeric2alpha: &str = "....";
|
||||
#[allow(dead_code)]
|
||||
pub const NUMERIC2ALPHA: &str = "....";
|
||||
|
||||
pub const alphaA: &str = "X.....";
|
||||
pub const alphaFNC1: &str = ".XXXX";
|
||||
pub const alpha2numeric: &str = "...";
|
||||
pub const alpha2isoiec646: &str = "..X..";
|
||||
#[allow(dead_code)]
|
||||
pub const ALPHA_A: &str = "X.....";
|
||||
#[allow(dead_code)]
|
||||
pub const ALPHA_FNC1: &str = ".XXXX";
|
||||
#[allow(dead_code)]
|
||||
pub const ALPHA2NUMERIC: &str = "...";
|
||||
#[allow(dead_code)]
|
||||
pub const ALPHA2ISOIEC646: &str = "..X..";
|
||||
|
||||
pub const i646B: &str = "X.....X";
|
||||
pub const i646C: &str = "X....X.";
|
||||
pub const i646FNC1: &str = ".XXXX";
|
||||
pub const isoiec6462alpha: &str = "..X..";
|
||||
#[allow(dead_code)]
|
||||
pub const I646_B: &str = "X.....X";
|
||||
#[allow(dead_code)]
|
||||
pub const I646_C: &str = "X....X.";
|
||||
#[allow(dead_code)]
|
||||
pub const I646_FNC1: &str = ".XXXX";
|
||||
#[allow(dead_code)]
|
||||
pub const ISOIEC6462ALPHA: &str = "..X..";
|
||||
|
||||
pub const compressedGtin900123456798908: &str = ".........X..XXX.X.X.X...XX.XXXXX.XXXX.X.";
|
||||
pub const compressedGtin900000000000008: &str = "........................................";
|
||||
#[allow(dead_code)]
|
||||
pub const COMPRESSED_GTIN900123456798908: &str = ".........X..XXX.X.X.X...XX.XXXXX.XXXX.X.";
|
||||
#[allow(dead_code)]
|
||||
pub const COMPRESSED_GTIN900000000000008: &str = "........................................";
|
||||
|
||||
pub const compressed15bitWeight1750: &str = "....XX.XX.X.XX.";
|
||||
pub const compressed15bitWeight11750: &str = ".X.XX.XXXX..XX.";
|
||||
pub const compressed15bitWeight0: &str = "...............";
|
||||
#[allow(dead_code)]
|
||||
pub const COMPRESSED15BIT_WEIGHT1750: &str = "....XX.XX.X.XX.";
|
||||
#[allow(dead_code)]
|
||||
pub const COMPRESSED15BIT_WEIGHT11750: &str = ".X.XX.XXXX..XX.";
|
||||
#[allow(dead_code)]
|
||||
pub const COMPRESSED15BIT_WEIGHT0: &str = "...............";
|
||||
|
||||
pub const compressed20bitWeight1750: &str = ".........XX.XX.X.XX.";
|
||||
#[allow(dead_code)]
|
||||
pub const COMPRESSED20BIT_WEIGHT1750: &str = ".........XX.XX.X.XX.";
|
||||
|
||||
pub const compressedDateMarch12th2010: &str = "....XXXX.X..XX..";
|
||||
pub const compressedDateEnd: &str = "X..X.XX.........";
|
||||
#[allow(dead_code)]
|
||||
pub const COMPRESSED_DATE_MARCH12TH2010: &str = "....XXXX.X..XX..";
|
||||
#[allow(dead_code)]
|
||||
pub const COMPRESSED_DATE_END: &str = "X..X.XX.........";
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn assertCorrectBinaryString(binaryString: &str, expectedNumber: &str) {
|
||||
let binary = binary_util::buildBitArrayFromStringWithoutSpaces(binaryString).expect("built");
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ mod AI013103DecoderTest {
|
||||
fn test0131031() {
|
||||
let data = format!(
|
||||
"{}{}{}",
|
||||
HEADER, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
HEADER, COMPRESSED_GTIN900123456798908, COMPRESSED15BIT_WEIGHT1750
|
||||
);
|
||||
let expected = "(01)90012345678908(3103)001750";
|
||||
assertCorrectBinaryString(&data, expected);
|
||||
@@ -94,7 +94,7 @@ mod AI013103DecoderTest {
|
||||
fn test0131032() {
|
||||
let data = format!(
|
||||
"{}{}{}",
|
||||
HEADER, compressedGtin900000000000008, compressed15bitWeight0
|
||||
HEADER, COMPRESSED_GTIN900000000000008, COMPRESSED15BIT_WEIGHT0
|
||||
);
|
||||
let expected = "(01)90000000000003(3103)000000";
|
||||
assertCorrectBinaryString(&data, expected);
|
||||
@@ -105,7 +105,7 @@ mod AI013103DecoderTest {
|
||||
fn test013103invalid() {
|
||||
let data = format!(
|
||||
"{}{}{}..",
|
||||
HEADER, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
HEADER, COMPRESSED_GTIN900123456798908, COMPRESSED15BIT_WEIGHT1750
|
||||
);
|
||||
assertCorrectBinaryString(&data, "");
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ const HEADER: &str = "..X.X";
|
||||
fn test0132021() {
|
||||
let data = format!(
|
||||
"{}{}{}",
|
||||
HEADER, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
HEADER, COMPRESSED_GTIN900123456798908, COMPRESSED15BIT_WEIGHT1750
|
||||
);
|
||||
let expected = "(01)90012345678908(3202)001750";
|
||||
|
||||
@@ -47,7 +47,7 @@ fn test0132021() {
|
||||
fn test0132031() {
|
||||
let data = format!(
|
||||
"{}{}{}",
|
||||
HEADER, compressedGtin900123456798908, compressed15bitWeight11750
|
||||
HEADER, COMPRESSED_GTIN900123456798908, COMPRESSED15BIT_WEIGHT11750
|
||||
);
|
||||
let expected = "(01)90012345678908(3203)001750";
|
||||
|
||||
|
||||
@@ -153,9 +153,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER310X11,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateEnd
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_END
|
||||
);
|
||||
let expected = "(01)90012345678908(3100)001750";
|
||||
|
||||
@@ -167,9 +167,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER310X11,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_MARCH12TH2010
|
||||
);
|
||||
let expected = "(01)90012345678908(3100)001750(11)100312";
|
||||
|
||||
@@ -181,9 +181,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER320X11,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_MARCH12TH2010
|
||||
);
|
||||
let expected = "(01)90012345678908(3200)001750(11)100312";
|
||||
|
||||
@@ -195,9 +195,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER310X13,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_MARCH12TH2010
|
||||
);
|
||||
let expected = "(01)90012345678908(3100)001750(13)100312";
|
||||
|
||||
@@ -209,9 +209,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER320X13,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_MARCH12TH2010
|
||||
);
|
||||
let expected = "(01)90012345678908(3200)001750(13)100312";
|
||||
|
||||
@@ -223,9 +223,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER310X15,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_MARCH12TH2010
|
||||
);
|
||||
let expected = "(01)90012345678908(3100)001750(15)100312";
|
||||
|
||||
@@ -237,9 +237,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER320X15,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_MARCH12TH2010
|
||||
);
|
||||
let expected = "(01)90012345678908(3200)001750(15)100312";
|
||||
|
||||
@@ -251,9 +251,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER310X17,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_MARCH12TH2010
|
||||
);
|
||||
let expected = "(01)90012345678908(3100)001750(17)100312";
|
||||
|
||||
@@ -265,9 +265,9 @@ mod AI013X0X1XDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
HEADER320X17,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
COMPRESSED_GTIN900123456798908,
|
||||
COMPRESSED20BIT_WEIGHT1750,
|
||||
COMPRESSED_DATE_MARCH12TH2010
|
||||
);
|
||||
let expected = "(01)90012345678908(3200)001750(17)100312";
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ mod AnyAIDecoderTest {
|
||||
fn testAnyAIDecoder1() {
|
||||
let data = format!(
|
||||
"{}{}{}{}{}{}{}",
|
||||
HEADER, numeric10, numeric12, numeric2alpha, alphaA, alpha2numeric, numeric12
|
||||
HEADER, NUMERIC10, NUMERIC12, NUMERIC2ALPHA, ALPHA_A, ALPHA2NUMERIC, NUMERIC12
|
||||
);
|
||||
let expected = "(10)12A12";
|
||||
|
||||
@@ -82,7 +82,7 @@ mod AnyAIDecoderTest {
|
||||
fn testAnyAIDecoder2() {
|
||||
let data = format!(
|
||||
"{}{}{}{}{}{}{}",
|
||||
HEADER, numeric10, numeric12, numeric2alpha, alphaA, alpha2isoiec646, i646B
|
||||
HEADER, NUMERIC10, NUMERIC12, NUMERIC2ALPHA, ALPHA_A, ALPHA2ISOIEC646, I646_B
|
||||
);
|
||||
let expected = "(10)12AB";
|
||||
|
||||
@@ -94,15 +94,15 @@ mod AnyAIDecoderTest {
|
||||
let data = format!(
|
||||
"{}{}{}{}{}{}{}{}{}{}",
|
||||
HEADER,
|
||||
numeric10,
|
||||
numeric2alpha,
|
||||
alpha2isoiec646,
|
||||
i646B,
|
||||
i646C,
|
||||
isoiec6462alpha,
|
||||
alphaA,
|
||||
alpha2numeric,
|
||||
numeric10
|
||||
NUMERIC10,
|
||||
NUMERIC2ALPHA,
|
||||
ALPHA2ISOIEC646,
|
||||
I646_B,
|
||||
I646_C,
|
||||
ISOIEC6462ALPHA,
|
||||
ALPHA_A,
|
||||
ALPHA2NUMERIC,
|
||||
NUMERIC10
|
||||
);
|
||||
let expected = "(10)BCA10";
|
||||
|
||||
@@ -111,7 +111,7 @@ mod AnyAIDecoderTest {
|
||||
|
||||
#[test]
|
||||
fn testAnyAIDecodernumericFNC1secondDigit() {
|
||||
let data = format!("{}{}{}", HEADER, numeric10, numeric1FNC1);
|
||||
let data = format!("{}{}{}", HEADER, NUMERIC10, NUMERIC1_FNC1);
|
||||
let expected = "(10)1";
|
||||
|
||||
assertCorrectBinaryString(&data, expected);
|
||||
@@ -121,7 +121,7 @@ mod AnyAIDecoderTest {
|
||||
fn testAnyAIDecoderalphaFNC1() {
|
||||
let data = format!(
|
||||
"{}{}{}{}{}",
|
||||
HEADER, numeric10, numeric2alpha, alphaA, alphaFNC1
|
||||
HEADER, NUMERIC10, NUMERIC2ALPHA, ALPHA_A, ALPHA_FNC1
|
||||
);
|
||||
let expected = "(10)A";
|
||||
|
||||
@@ -132,7 +132,7 @@ mod AnyAIDecoderTest {
|
||||
fn testAnyAIDecoder646FNC1() {
|
||||
let data = format!(
|
||||
"{}{}{}{}{}{}{}",
|
||||
HEADER, numeric10, numeric2alpha, alphaA, isoiec6462alpha, i646B, i646FNC1
|
||||
HEADER, NUMERIC10, NUMERIC2ALPHA, ALPHA_A, ISOIEC6462ALPHA, I646_B, I646_FNC1
|
||||
);
|
||||
let expected = "(10)AB";
|
||||
|
||||
|
||||
@@ -48,7 +48,9 @@ impl DecodedNumeric {
|
||||
pub fn new(newPosition: usize, firstDigit: u32, secondDigit: u32) -> Result<Self, Exceptions> {
|
||||
// super(newPosition);
|
||||
|
||||
if /*firstDigit < 0 ||*/ firstDigit > 10 || /*secondDigit < 0 ||*/ secondDigit > 10 {
|
||||
if
|
||||
/*firstDigit < 0 ||*/
|
||||
firstDigit > 10 || /*secondDigit < 0 ||*/ secondDigit > 10 {
|
||||
return Err(Exceptions::FormatException(
|
||||
".getFormatInstance();".to_owned(),
|
||||
));
|
||||
|
||||
@@ -23,18 +23,16 @@
|
||||
*
|
||||
* http://www.piramidepse.com/
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es)
|
||||
* @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)
|
||||
*/
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::Exceptions;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
/**
|
||||
* @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es)
|
||||
* @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)
|
||||
*/
|
||||
|
||||
lazy_static! {
|
||||
|
||||
static ref TWO_DIGIT_DATA_LENGTH : HashMap<String,DataLength> = {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
common::{detector::MathUtils, BitArray},
|
||||
common::BitArray,
|
||||
oned::{
|
||||
recordPattern, recordPatternInReverse,
|
||||
rss::{
|
||||
@@ -287,6 +287,7 @@ impl RSSExpandedReader {
|
||||
[45, 135, 194, 160, 58, 174, 100, 89],
|
||||
];
|
||||
|
||||
#[allow(dead_code)]
|
||||
const MAX_PAIRS: usize = 11;
|
||||
|
||||
// Not private for testing
|
||||
@@ -536,6 +537,7 @@ impl RSSExpandedReader {
|
||||
|
||||
// Only used for unit testing
|
||||
#[cfg(test)]
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn getRowsMut(&mut self) -> &mut [ExpandedRow] {
|
||||
&mut self.rows
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
common::{detector::MathUtils, BitArray},
|
||||
common::BitArray,
|
||||
oned::{one_d_reader, OneDReader},
|
||||
BarcodeFormat, DecodeHintType, DecodingHintDictionary, Exceptions, RXingResult,
|
||||
RXingResultMetadataType, RXingResultMetadataValue, RXingResultPoint, Reader, ResultPoint,
|
||||
@@ -250,7 +250,7 @@ impl RSS14Reader {
|
||||
row: &BitArray,
|
||||
right: bool,
|
||||
rowNumber: u32,
|
||||
hints: &DecodingHintDictionary,
|
||||
_hints: &DecodingHintDictionary,
|
||||
) -> Option<Pair> {
|
||||
let pos_pair = || -> Result<Pair, Exceptions> {
|
||||
let startEnd = self.findFinderPattern(row, right)?;
|
||||
@@ -464,9 +464,9 @@ impl RSS14Reader {
|
||||
}
|
||||
firstElementStart += 1;
|
||||
let firstCounter = startEnd[0] - firstElementStart as usize;
|
||||
let counters = &mut self.decodeFinderCounters;
|
||||
let counters = &mut self.decodeFinderCounters;
|
||||
let counter_len = counters.len();
|
||||
|
||||
|
||||
counters.copy_within(..counter_len - 1, 1);
|
||||
// Make 'counters' hold 1-4
|
||||
// let counters = self.getDecodeFinderCounters();
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
RXingResultMetadataValue, RXingResultPoint,
|
||||
};
|
||||
|
||||
use super::{upc_ean_reader, STAND_IN, UPCEANReader};
|
||||
use super::{upc_ean_reader, UPCEANReader, STAND_IN};
|
||||
|
||||
/**
|
||||
* @see UPCEANExtension5Support
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
RXingResultMetadataValue, RXingResultPoint,
|
||||
};
|
||||
|
||||
use super::{upc_ean_reader, STAND_IN, UPCEANReader};
|
||||
use super::{upc_ean_reader, UPCEANReader, STAND_IN};
|
||||
|
||||
/**
|
||||
* @see UPCEANExtension2Support
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use crate::{common::BitArray, Exceptions, RXingResult};
|
||||
|
||||
use super::{STAND_IN, UPCEANExtension2Support, UPCEANExtension5Support, UPCEANReader};
|
||||
use super::{UPCEANExtension2Support, UPCEANExtension5Support, UPCEANReader, STAND_IN};
|
||||
|
||||
pub struct UPCEANExtensionSupport {
|
||||
twoSupport: UPCEANExtension2Support,
|
||||
|
||||
@@ -442,7 +442,7 @@ pub trait UPCEANReader: OneDReader {
|
||||
return Ok([patternStart, x]);
|
||||
}
|
||||
patternStart += (counters[0] + counters[1]) as usize;
|
||||
|
||||
|
||||
counters.copy_within(2..(counterPosition - 1 + 2), 0);
|
||||
// System.arraycopy(counters, 2, counters, 0, counterPosition - 1);
|
||||
counters[counterPosition - 1] = 0;
|
||||
|
||||
Reference in New Issue
Block a user