@@ -115,7 +115,7 @@ impl ClippyCmd {
115
115
}
116
116
}
117
117
118
- fn path ( & self ) -> PathBuf {
118
+ fn path ( ) -> PathBuf {
119
119
let mut path = env:: current_exe ( )
120
120
. expect ( "current executable path invalid" )
121
121
. with_file_name ( "clippy-driver" ) ;
@@ -143,10 +143,10 @@ impl ClippyCmd {
143
143
. map ( |p| ( "CARGO_TARGET_DIR" , p) )
144
144
}
145
145
146
- fn to_std_cmd ( self ) -> Command {
146
+ fn into_std_cmd ( self ) -> Command {
147
147
let mut cmd = Command :: new ( "cargo" ) ;
148
148
149
- cmd. env ( self . path_env ( ) , self . path ( ) )
149
+ cmd. env ( self . path_env ( ) , Self :: path ( ) )
150
150
. envs ( ClippyCmd :: target_dir ( ) )
151
151
. env ( "CLIPPY_ARGS" , self . clippy_args )
152
152
. arg ( self . cargo_subcommand )
@@ -162,7 +162,7 @@ where
162
162
{
163
163
let cmd = ClippyCmd :: new ( old_args) ;
164
164
165
- let mut cmd = cmd. to_std_cmd ( ) ;
165
+ let mut cmd = cmd. into_std_cmd ( ) ;
166
166
167
167
let exit_status = cmd
168
168
. spawn ( )
@@ -179,7 +179,7 @@ where
179
179
180
180
#[ cfg( test) ]
181
181
mod tests {
182
- use super :: * ;
182
+ use super :: ClippyCmd ;
183
183
184
184
#[ test]
185
185
#[ should_panic]
@@ -196,7 +196,7 @@ mod tests {
196
196
let cmd = ClippyCmd :: new ( args) ;
197
197
assert_eq ! ( "fix" , cmd. cargo_subcommand) ;
198
198
assert_eq ! ( "RUSTC_WORKSPACE_WRAPPER" , cmd. path_env( ) ) ;
199
- assert ! ( cmd. args. iter( ) . find ( |arg| arg. ends_with( "unstable-options" ) ) . is_some ( ) ) ;
199
+ assert ! ( cmd. args. iter( ) . any ( |arg| arg. ends_with( "unstable-options" ) ) ) ;
200
200
}
201
201
202
202
#[ test]
0 commit comments