File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -29,18 +29,11 @@ fn main() -> std::io::Result<()> {
29
29
. split ( '\n' )
30
30
{
31
31
if let Some ( stripped) = line. strip_prefix ( "include:" ) {
32
- cmd. arg ( "--also-match" ) . arg ( absolutelyfy ( stripped ) ) ;
32
+ cmd. arg ( "--also-match=" . to_owned ( ) + stripped ) ;
33
33
} else if let Some ( stripped) = line. strip_prefix ( "exclude:" ) {
34
- cmd. arg ( "--exclude" ) . arg ( stripped) ;
34
+ cmd. arg ( "--exclude=" . to_owned ( ) + stripped) ;
35
35
}
36
36
}
37
37
let exit = & cmd. spawn ( ) ?. wait ( ) ?;
38
38
std:: process:: exit ( exit. code ( ) . unwrap_or ( 1 ) )
39
39
}
40
-
41
- // converts the relative path `stripped` to an absolute path by prepending the working directory
42
- fn absolutelyfy ( stripped : & str ) -> String {
43
- let pwd = env:: current_dir ( ) . unwrap ( ) ;
44
-
45
- pwd. join ( stripped) . into_os_string ( ) . into_string ( ) . unwrap ( )
46
- }
Original file line number Diff line number Diff line change @@ -29,18 +29,11 @@ fn main() -> std::io::Result<()> {
29
29
. split ( '\n' )
30
30
{
31
31
if let Some ( stripped) = line. strip_prefix ( "include:" ) {
32
- cmd. arg ( "--also-match" ) . arg ( absolutelyfy ( stripped ) ) ;
32
+ cmd. arg ( "--also-match=" . to_owned ( ) + stripped ) ;
33
33
} else if let Some ( stripped) = line. strip_prefix ( "exclude:" ) {
34
- cmd. arg ( "--exclude" ) . arg ( stripped) ;
34
+ cmd. arg ( "--exclude=" . to_owned ( ) + stripped) ;
35
35
}
36
36
}
37
37
let exit = & cmd. spawn ( ) ?. wait ( ) ?;
38
38
std:: process:: exit ( exit. code ( ) . unwrap_or ( 1 ) )
39
39
}
40
-
41
- // converts the relative path `stripped` to an absolute path by prepending the working directory
42
- fn absolutelyfy ( stripped : & str ) -> String {
43
- let pwd = env:: current_dir ( ) . unwrap ( ) ;
44
-
45
- pwd. join ( stripped) . into_os_string ( ) . into_string ( ) . unwrap ( )
46
- }
You can’t perform that action at this time.
0 commit comments