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 6969#![ warn( missing_debug_implementations) ]
7070#![ warn( missing_docs) ]
7171#![ allow( explicit_outlives_requirements) ]
72+ #![ cfg_attr( bootstrap, allow( incomplete_features) ) ] // if_let_guard
7273//
7374// Library features for const fns:
7475#![ feature( const_align_of_val) ]
134135#![ feature( exhaustive_patterns) ]
135136#![ feature( extern_types) ]
136137#![ feature( fundamental) ]
138+ #![ feature( if_let_guard) ]
137139#![ feature( intra_doc_pointers) ]
138140#![ feature( intrinsics) ]
139141#![ 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> {
236236
237237 let num = match parse_number ( s, negative) {
238238 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 ( ) ) ,
246241 } ;
247242 if let Some ( value) = num. try_fast_path :: < F > ( ) {
248243 return Ok ( value) ;
You can’t perform that action at this time.
0 commit comments