File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -62,27 +62,29 @@ where
62
62
let mut unstable_options = false ;
63
63
64
64
for arg in old_args. by_ref ( ) {
65
- match arg {
65
+ match arg. as_str ( ) {
66
66
"--fix" => {
67
67
fix = true ;
68
68
continue ;
69
- } ,
69
+ }
70
70
"--" => break ,
71
71
// Cover -Zunstable-options and -Z unstable-options
72
72
s if s. ends_with ( "unstable-options" ) => unstable_options = true ,
73
- _ => { } ,
73
+ _ => { }
74
74
}
75
75
76
76
args. push ( arg) ;
77
77
}
78
78
79
- if fix && !unstable_options {
80
- panic ! ( "Usage of `--fix` requires `-Z unstable-options`" ) ;
81
- } else {
82
- args[ 0 ] = "fix" . to_owned ( ) ;
79
+ if fix {
80
+ if !unstable_options {
81
+ panic ! ( "Usage of `--fix` requires `-Z unstable-options`" ) ;
82
+ } else {
83
+ args[ 0 ] = "fix" . to_owned ( ) ;
84
+ }
83
85
}
84
86
85
- let env_name = if unstable_options {
87
+ let path_env = if unstable_options {
86
88
"RUSTC_WORKSPACE_WRAPPER"
87
89
} else {
88
90
"RUSTC_WRAPPER"
@@ -119,7 +121,7 @@ where
119
121
120
122
let exit_status = std:: process:: Command :: new ( "cargo" )
121
123
. args ( & args)
122
- . env ( "RUSTC_WORKSPACE_WRAPPER" , path)
124
+ . env ( path_env , path)
123
125
. env ( "CLIPPY_ARGS" , clippy_args)
124
126
. envs ( target_dir)
125
127
. spawn ( )
You can’t perform that action at this time.
0 commit comments