@@ -194,7 +194,7 @@ impl IntParse {
194194 index += 1 ;
195195 return match data. get ( index) {
196196 Some ( b'.' ) => Ok ( ( Self :: Float , index) ) ,
197- Some ( b'e' ) | Some ( b'E' ) => Ok ( ( Self :: Float , index) ) ,
197+ Some ( b'e' | b'E' ) => Ok ( ( Self :: Float , index) ) ,
198198 Some ( digit) if digit. is_ascii_digit ( ) => json_err ! ( InvalidNumber , index) ,
199199 _ => Ok ( ( Self :: Int ( NumberInt :: Int ( 0 ) ) , index) ) ,
200200 } ;
@@ -213,7 +213,7 @@ impl IntParse {
213213 IntChunk :: Done ( value) => {
214214 let mut value_i64 = value as i64 ;
215215 if !positive {
216- value_i64 = -value_i64
216+ value_i64 = -value_i64;
217217 }
218218 return Ok ( ( Self :: Int ( NumberInt :: Int ( value_i64) ) , new_index) ) ;
219219 }
@@ -379,7 +379,7 @@ impl AbstractNumberDecoder for NumberRange {
379379 let end = consume_decimal ( data, index) ?;
380380 Ok ( ( start..end, end) )
381381 }
382- Some ( b'e' ) | Some ( b'E' ) => {
382+ Some ( b'e' | b'E' ) => {
383383 index += 1 ;
384384 let end = consume_exponential ( data, index) ?;
385385 Ok ( ( start..end, end) )
@@ -420,6 +420,7 @@ impl AbstractNumberDecoder for NumberRange {
420420 if ( new_index - start) > 4300 {
421421 return json_err ! ( NumberOutOfRange , start + 4301 ) ;
422422 }
423+ #[ allow( clippy:: single_match_else) ]
423424 match chunk {
424425 IntChunk :: Ongoing ( _) => {
425426 index = new_index;
@@ -446,7 +447,7 @@ impl AbstractNumberDecoder for NumberRange {
446447
447448fn consume_exponential ( data : & [ u8 ] , mut index : usize ) -> JsonResult < usize > {
448449 match data. get ( index) {
449- Some ( b'-' ) | Some ( b'+' ) => {
450+ Some ( b'-' | b'+' ) => {
450451 index += 1 ;
451452 }
452453 Some ( v) if v. is_ascii_digit ( ) => ( ) ,
0 commit comments