rename helper methods

This commit is contained in:
Vukašin Stepanović
2023-02-15 12:52:59 +00:00
parent bfcdb397ad
commit 935519ced5
133 changed files with 858 additions and 1044 deletions

View File

@@ -52,9 +52,8 @@ impl UPCEANReader for EAN8Reader {
while x < 4 && rowOffset < end {
let bestMatch =
self.decodeDigit(row, &mut counters, rowOffset, &upc_ean_reader::L_PATTERNS)?;
resultString.push(
char::from_u32('0' as u32 + bestMatch as u32).ok_or(Exceptions::parseEmpty())?,
);
resultString
.push(char::from_u32('0' as u32 + bestMatch as u32).ok_or(Exceptions::parse)?);
rowOffset += counters.iter().sum::<u32>() as usize;
@@ -69,9 +68,8 @@ impl UPCEANReader for EAN8Reader {
while x < 4 && rowOffset < end {
let bestMatch =
self.decodeDigit(row, &mut counters, rowOffset, &upc_ean_reader::L_PATTERNS)?;
resultString.push(
char::from_u32('0' as u32 + bestMatch as u32).ok_or(Exceptions::parseEmpty())?,
);
resultString
.push(char::from_u32('0' as u32 + bestMatch as u32).ok_or(Exceptions::parse)?);
rowOffset += counters.iter().sum::<u32>() as usize;
x += 1;