File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 69
69
#![ warn( missing_debug_implementations) ]
70
70
#![ warn( missing_docs) ]
71
71
#![ allow( explicit_outlives_requirements) ]
72
+ #![ cfg_attr( bootstrap, allow( incomplete_features) ) ] // if_let_guard
72
73
//
73
74
// Library features for const fns:
74
75
#![ feature( const_align_of_val) ]
134
135
#![ feature( exhaustive_patterns) ]
135
136
#![ feature( extern_types) ]
136
137
#![ feature( fundamental) ]
138
+ #![ feature( if_let_guard) ]
137
139
#![ feature( intra_doc_pointers) ]
138
140
#![ feature( intrinsics) ]
139
141
#![ feature( lang_items) ]
Original file line number Diff line number Diff line change @@ -236,13 +236,8 @@ pub fn dec2flt<F: RawFloat>(s: &str) -> Result<F, ParseFloatError> {
236
236
237
237
let num = match parse_number ( s, negative) {
238
238
Some ( r) => r,
239
- None => {
240
- if let Some ( value) = parse_inf_nan ( s, negative) {
241
- return Ok ( value) ;
242
- } else {
243
- return Err ( pfe_invalid ( ) ) ;
244
- }
245
- }
239
+ None if let Some ( value) = parse_inf_nan ( s, negative) => return Ok ( value) ,
240
+ None => return Err ( pfe_invalid ( ) ) ,
246
241
} ;
247
242
if let Some ( value) = num. try_fast_path :: < F > ( ) {
248
243
return Ok ( value) ;
You can’t perform that action at this time.
0 commit comments