mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
chore: various cleanups, version bump 0.4.12
This commit is contained in:
@@ -149,7 +149,7 @@ impl OneDReader for Code39Reader {
|
||||
}
|
||||
}
|
||||
impl Code39Reader {
|
||||
pub const ALPHABET_STRING: &str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
|
||||
pub const ALPHABET_STRING: &'static str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
|
||||
|
||||
/**
|
||||
* These represent the encodings of characters, as patterns of wide and narrow bars.
|
||||
|
||||
@@ -134,7 +134,7 @@ impl OneDReader for Code93Reader {
|
||||
|
||||
impl Code93Reader {
|
||||
// Note that 'abcd' are dummy characters in place of control characters.
|
||||
pub const ALPHABET_STRING: &str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*";
|
||||
pub const ALPHABET_STRING: &'static str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*";
|
||||
pub const ALPHABET: [char; 48] = [
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
|
||||
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
|
||||
@@ -49,7 +49,7 @@ pub fn buildBitArray(pairs: &Vec<ExpandedPair>) -> Option<BitArray> {
|
||||
let mut binary = BitArray::with_size(size);
|
||||
let mut accPos = 0;
|
||||
|
||||
let firstPair = pairs.get(0)?;
|
||||
let firstPair = pairs.first()?;
|
||||
let rp = firstPair.getRightChar().as_ref()?;
|
||||
let firstValue = rp.getValue();
|
||||
let mut i = 11;
|
||||
|
||||
@@ -535,7 +535,7 @@ impl RSSExpandedReader {
|
||||
let resultingString = decoder.parseInformation()?;
|
||||
|
||||
let firstPoints = pairs
|
||||
.get(0)
|
||||
.first()
|
||||
.ok_or(Exceptions::INDEX_OUT_OF_BOUNDS)?
|
||||
.getFinderPattern()
|
||||
.as_ref()
|
||||
@@ -565,7 +565,7 @@ impl RSSExpandedReader {
|
||||
}
|
||||
|
||||
fn checkChecksum(&self) -> bool {
|
||||
let Some(firstPair) = self.pairs.get(0) else {
|
||||
let Some(firstPair) = self.pairs.first() else {
|
||||
return false;
|
||||
};
|
||||
let checkCharacter = firstPair.getLeftChar();
|
||||
|
||||
Reference in New Issue
Block a user