Skip to content

Commit 9d8d018

Browse files
committed
clippy fix
1 parent 13c7a4d commit 9d8d018

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/datamatrix/decoder/decoded_bit_stream_parser.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ fn decodeAsciiSegment(
229229
231=> // Latch to Base 256 encodation
230230
return Ok(Mode::BASE256_ENCODE),
231231
232=> {// FNC1
232-
if (bits.getByteOffset() == firstFNC1Position)
232+
if bits.getByteOffset() == firstFNC1Position
233233
{/*result.symbology.modifier = '2';*/} // GS1
234-
else if (bits.getByteOffset() == firstFNC1Position + 1)
234+
else if bits.getByteOffset() == firstFNC1Position + 1
235235
{/*result.symbology.modifier = '3';*/} // AIM, note no AIM Application Indicator format defined, ISO 16022:2006 11.2
236236
else
237237
{fnc1positions.push(result.len());
@@ -242,7 +242,7 @@ fn decodeAsciiSegment(
242242
// Ignore these symbols for now
243243
//throw ReaderException.getInstance();
244244
{
245-
if (!firstCodeword) // Must be first ISO 16022:2006 5.6.1
245+
if !firstCodeword // Must be first ISO 16022:2006 5.6.1
246246
{return Err(Exceptions::FormatException(Some("structured append tag must be first code word".to_owned())));}
247247
parse_structured_append(bits, &mut sai)?;
248248
firstFNC1Position = 5;
@@ -682,19 +682,19 @@ fn decodeBase256Segment(
682682
*/
683683
fn decodeECISegment(bits: &mut BitSource, result: &mut ECIStringBuilder) -> Result<(), Exceptions> {
684684
let firstByte = bits.readBits(8)?;
685-
if (firstByte <= 127) {
685+
if firstByte <= 127 {
686686
return result.appendECI(firstByte - 1);
687687
}
688688

689689
let secondByte = bits.readBits(8)?;
690-
if (firstByte <= 191) {
690+
if firstByte <= 191 {
691691
return result.appendECI(firstByte - 1);
692692
}
693693

694694
let thirdByte = bits.readBits(8)?;
695695

696-
return result
697-
.appendECI((firstByte - 192) * 64516 + 16383 + (secondByte - 1) * 254 + thirdByte - 1);
696+
result
697+
.appendECI((firstByte - 192) * 64516 + 16383 + (secondByte - 1) * 254 + thirdByte - 1)
698698

699699
// if bits.available() < 8 {
700700
// return Err(Exceptions::FormatException(None));
@@ -733,7 +733,7 @@ fn parse_structured_append(
733733
sai.index = (symbolSequenceIndicator >> 4) as i32;
734734
sai.count = (17 - (symbolSequenceIndicator & 0x0F)) as i32; // 2-16 permitted, 17 invalid
735735

736-
if (sai.count == 17 || sai.count <= sai.index)
736+
if sai.count == 17 || sai.count <= sai.index
737737
// If info doesn't make sense
738738
{
739739
sai.count = 0; // Choose to mark count as unknown

0 commit comments

Comments
 (0)