File tree 1 file changed +3
-14
lines changed
1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ use util::logv;
21
21
#[ cfg( target_os = "windows" ) ]
22
22
use util;
23
23
24
+ #[ cfg( target_os = "windows" ) ]
25
+ use std:: ascii:: AsciiExt ;
24
26
use std:: io:: File ;
25
27
use std:: io:: fs:: PathExtensions ;
26
28
use std:: io:: fs;
@@ -985,22 +987,9 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
985
987
format ! ( "{}:{}:" , testfile. display( ) , ee. line)
986
988
} ) . collect :: < Vec < String > > ( ) ;
987
989
988
- #[ cfg( target_os = "windows" ) ]
989
- fn to_lower ( s : & str ) -> String {
990
- let i = s. chars ( ) ;
991
- let c : Vec < char > = i. map ( |c| {
992
- if c. is_ascii ( ) {
993
- c. to_ascii ( ) . to_lowercase ( ) . as_char ( )
994
- } else {
995
- c
996
- }
997
- } ) . collect ( ) ;
998
- String :: from_chars ( c. as_slice ( ) )
999
- }
1000
-
1001
990
#[ cfg( windows) ]
1002
991
fn prefix_matches ( line : & str , prefix : & str ) -> bool {
1003
- to_lower ( line) . as_slice ( ) . starts_with ( to_lower ( prefix) . as_slice ( ) )
992
+ line. to_ascii_lowercase ( ) . starts_with ( prefix. to_ascii_lowercase ( ) . as_slice ( ) )
1004
993
}
1005
994
1006
995
#[ cfg( unix) ]
You can’t perform that action at this time.
0 commit comments