File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,7 @@ use prelude::v1::*;
9696use fmt;
9797use str:: FromStr ;
9898
99- use self :: parse:: { parse_decimal, Decimal , Sign } ;
100- use self :: parse:: ParseResult :: { Valid , Invalid , ShortcutToInf , ShortcutToZero } ;
99+ use self :: parse:: { parse_decimal, Decimal , Sign , ParseResult } ;
101100use self :: num:: digits_to_big;
102101use self :: rawfp:: RawFloat ;
103102
@@ -208,10 +207,10 @@ fn dec2flt<T: RawFloat>(s: &str) -> Result<T, ParseFloatError> {
208207 }
209208 let ( sign, s) = extract_sign ( s) ;
210209 let flt = match parse_decimal ( s) {
211- Valid ( decimal) => try!( convert ( decimal) ) ,
212- ShortcutToInf => T :: infinity ( ) ,
213- ShortcutToZero => T :: zero ( ) ,
214- Invalid => match s {
210+ ParseResult :: Valid ( decimal) => try!( convert ( decimal) ) ,
211+ ParseResult :: ShortcutToInf => T :: infinity ( ) ,
212+ ParseResult :: ShortcutToZero => T :: zero ( ) ,
213+ ParseResult :: Invalid => match s {
215214 "inf" => T :: infinity ( ) ,
216215 "NaN" => T :: nan ( ) ,
217216 _ => { return Err ( pfe_invalid ( ) ) ; }
You can’t perform that action at this time.
0 commit comments