File tree Expand file tree Collapse file tree 1 file changed +2
-21
lines changed
Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -1269,25 +1269,6 @@ where
12691269 F : Fn ( & str ) -> Result < T , E > ,
12701270 T : Clone + Num ,
12711271{
1272- #[ cfg( not( feature = "std" ) ) ]
1273- #[ inline]
1274- fn is_whitespace ( c : char ) -> bool {
1275- match c {
1276- ' ' | '\x09' ..='\x0d' => true ,
1277- _ if c > '\x7f' => match c {
1278- '\u{0085}' | '\u{00a0}' | '\u{1680}' => true ,
1279- '\u{2000}' ..='\u{200a}' => true ,
1280- '\u{2028}' | '\u{2029}' | '\u{202f}' | '\u{205f}' => true ,
1281- '\u{3000}' => true ,
1282- _ => false ,
1283- } ,
1284- _ => false ,
1285- }
1286- }
1287-
1288- #[ cfg( feature = "std" ) ]
1289- let is_whitespace = char:: is_whitespace;
1290-
12911272 let imag = match s. rfind ( 'j' ) {
12921273 None => 'i' ,
12931274 _ => 'j' ,
@@ -1304,8 +1285,8 @@ where
13041285 // ignore '+'/'-' if part of an exponent
13051286 if ( c == b'+' || c == b'-' ) && !( p == b'e' || p == b'E' ) {
13061287 // trim whitespace around the separator
1307- a = & s[ ..=i] . trim_right_matches ( is_whitespace) ;
1308- b = & s[ i + 2 ..] . trim_left_matches ( is_whitespace) ;
1288+ a = & s[ ..=i] . trim_right_matches ( char :: is_whitespace) ;
1289+ b = & s[ i + 2 ..] . trim_left_matches ( char :: is_whitespace) ;
13091290 neg_b = c == b'-' ;
13101291
13111292 if b. is_empty ( ) || ( neg_b && b. starts_with ( '-' ) ) {
You can’t perform that action at this time.
0 commit comments