@@ -409,30 +409,28 @@ fn lit_bigint(lexeme: &str, radix: u32) -> Option<BigInt> {
409
409
}
410
410
411
411
fn timing_literal ( lexeme : & str , token : Token , kind : TimingLiteralKind ) -> Result < Option < Lit > > {
412
- {
413
- let lexeme = lexeme
414
- . chars ( )
415
- . filter ( |x| * x != '_' )
416
- . take_while ( |x| x. is_numeric ( ) || * x == '.' )
417
- . collect :: < String > ( ) ;
418
-
419
- let value = lexeme
420
- . parse ( )
421
- . map_err ( |_| Error :: new ( ErrorKind :: Lit ( "timing" , token. span ) ) ) ?;
422
-
423
- let unit = match kind {
424
- TimingLiteralKind :: Dt => TimeUnit :: Dt ,
425
- TimingLiteralKind :: Ns => TimeUnit :: Ns ,
426
- TimingLiteralKind :: Us => TimeUnit :: Us ,
427
- TimingLiteralKind :: Ms => TimeUnit :: Ms ,
428
- TimingLiteralKind :: S => TimeUnit :: S ,
429
- } ;
412
+ let lexeme = lexeme
413
+ . chars ( )
414
+ . filter ( |x| * x != '_' )
415
+ . take_while ( |x| x. is_numeric ( ) || * x == '.' )
416
+ . collect :: < String > ( ) ;
417
+
418
+ let value = lexeme
419
+ . parse ( )
420
+ . map_err ( |_| Error :: new ( ErrorKind :: Lit ( "timing" , token. span ) ) ) ?;
421
+
422
+ let unit = match kind {
423
+ TimingLiteralKind :: Dt => TimeUnit :: Dt ,
424
+ TimingLiteralKind :: Ns => TimeUnit :: Ns ,
425
+ TimingLiteralKind :: Us => TimeUnit :: Us ,
426
+ TimingLiteralKind :: Ms => TimeUnit :: Ms ,
427
+ TimingLiteralKind :: S => TimeUnit :: S ,
428
+ } ;
430
429
431
- Ok ( Some ( Lit {
432
- span : token. span ,
433
- kind : LiteralKind :: Duration { value, unit } ,
434
- } ) )
435
- }
430
+ Ok ( Some ( Lit {
431
+ span : token. span ,
432
+ kind : LiteralKind :: Duration { value, unit } ,
433
+ } ) )
436
434
}
437
435
438
436
pub ( crate ) fn paren_expr ( s : & mut ParserContext , lo : u32 ) -> Result < Expr > {
0 commit comments