@@ -229,9 +229,9 @@ fn decodeAsciiSegment(
229
229
231 => // Latch to Base 256 encodation
230
230
return Ok ( Mode :: BASE256_ENCODE ) ,
231
231
232 => { // FNC1
232
- if ( bits. getByteOffset ( ) == firstFNC1Position)
232
+ if bits. getByteOffset ( ) == firstFNC1Position
233
233
{ /*result.symbology.modifier = '2';*/ } // GS1
234
- else if ( bits. getByteOffset ( ) == firstFNC1Position + 1 )
234
+ else if bits. getByteOffset ( ) == firstFNC1Position + 1
235
235
{ /*result.symbology.modifier = '3';*/ } // AIM, note no AIM Application Indicator format defined, ISO 16022:2006 11.2
236
236
else
237
237
{ fnc1positions. push ( result. len ( ) ) ;
@@ -242,7 +242,7 @@ fn decodeAsciiSegment(
242
242
// Ignore these symbols for now
243
243
//throw ReaderException.getInstance();
244
244
{
245
- if ( !firstCodeword) // Must be first ISO 16022:2006 5.6.1
245
+ if !firstCodeword // Must be first ISO 16022:2006 5.6.1
246
246
{ return Err ( Exceptions :: FormatException ( Some ( "structured append tag must be first code word" . to_owned ( ) ) ) ) ; }
247
247
parse_structured_append ( bits, & mut sai) ?;
248
248
firstFNC1Position = 5 ;
@@ -682,19 +682,19 @@ fn decodeBase256Segment(
682
682
*/
683
683
fn decodeECISegment ( bits : & mut BitSource , result : & mut ECIStringBuilder ) -> Result < ( ) , Exceptions > {
684
684
let firstByte = bits. readBits ( 8 ) ?;
685
- if ( firstByte <= 127 ) {
685
+ if firstByte <= 127 {
686
686
return result. appendECI ( firstByte - 1 ) ;
687
687
}
688
688
689
689
let secondByte = bits. readBits ( 8 ) ?;
690
- if ( firstByte <= 191 ) {
690
+ if firstByte <= 191 {
691
691
return result. appendECI ( firstByte - 1 ) ;
692
692
}
693
693
694
694
let thirdByte = bits. readBits ( 8 ) ?;
695
695
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 )
698
698
699
699
// if bits.available() < 8 {
700
700
// return Err(Exceptions::FormatException(None));
@@ -733,7 +733,7 @@ fn parse_structured_append(
733
733
sai. index = ( symbolSequenceIndicator >> 4 ) as i32 ;
734
734
sai. count = ( 17 - ( symbolSequenceIndicator & 0x0F ) ) as i32 ; // 2-16 permitted, 17 invalid
735
735
736
- if ( sai. count == 17 || sai. count <= sai. index )
736
+ if sai. count == 17 || sai. count <= sai. index
737
737
// If info doesn't make sense
738
738
{
739
739
sai. count = 0 ; // Choose to mark count as unknown
0 commit comments