File tree 1 file changed +3
-3
lines changed
compiler/rustc_builtin_macros/src
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ pub(crate) mod printf {
421
421
state = Prec ;
422
422
parameter = None ;
423
423
flags = "" ;
424
- width = at. slice_between ( end) . map ( |num| Num :: from_str ( num, None ) ) ;
424
+ width = at. slice_between ( end) . and_then ( |num| Num :: from_str ( num, None ) ) ;
425
425
if width. is_none ( ) {
426
426
return fallback ( ) ;
427
427
}
@@ -455,7 +455,7 @@ pub(crate) mod printf {
455
455
'1' ..='9' => {
456
456
let end = at_next_cp_while ( next, char:: is_ascii_digit) ;
457
457
state = Prec ;
458
- width = at. slice_between ( end) . map ( |num| Num :: from_str ( num, None ) ) ;
458
+ width = at. slice_between ( end) . and_then ( |num| Num :: from_str ( num, None ) ) ;
459
459
if width. is_none ( ) {
460
460
return fallback ( ) ;
461
461
}
@@ -519,7 +519,7 @@ pub(crate) mod printf {
519
519
'0' ..='9' => {
520
520
let end = at_next_cp_while ( next, char:: is_ascii_digit) ;
521
521
state = Length ;
522
- precision = at. slice_between ( end) . map ( |num| Num :: from_str ( num, None ) ) ;
522
+ precision = at. slice_between ( end) . and_then ( |num| Num :: from_str ( num, None ) ) ;
523
523
move_to ! ( end) ;
524
524
}
525
525
_ => return fallback ( ) ,
You can’t perform that action at this time.
0 commit comments