@@ -115,7 +115,7 @@ impl ClippyCmd {
115115 }
116116 }
117117
118- fn path ( & self ) -> PathBuf {
118+ fn path ( ) -> PathBuf {
119119 let mut path = env:: current_exe ( )
120120 . expect ( "current executable path invalid" )
121121 . with_file_name ( "clippy-driver" ) ;
@@ -143,10 +143,10 @@ impl ClippyCmd {
143143 . map ( |p| ( "CARGO_TARGET_DIR" , p) )
144144 }
145145
146- fn to_std_cmd ( self ) -> Command {
146+ fn into_std_cmd ( self ) -> Command {
147147 let mut cmd = Command :: new ( "cargo" ) ;
148148
149- cmd. env ( self . path_env ( ) , self . path ( ) )
149+ cmd. env ( self . path_env ( ) , Self :: path ( ) )
150150 . envs ( ClippyCmd :: target_dir ( ) )
151151 . env ( "CLIPPY_ARGS" , self . clippy_args )
152152 . arg ( self . cargo_subcommand )
@@ -162,7 +162,7 @@ where
162162{
163163 let cmd = ClippyCmd :: new ( old_args) ;
164164
165- let mut cmd = cmd. to_std_cmd ( ) ;
165+ let mut cmd = cmd. into_std_cmd ( ) ;
166166
167167 let exit_status = cmd
168168 . spawn ( )
@@ -179,7 +179,7 @@ where
179179
180180#[ cfg( test) ]
181181mod tests {
182- use super :: * ;
182+ use super :: ClippyCmd ;
183183
184184 #[ test]
185185 #[ should_panic]
@@ -196,7 +196,7 @@ mod tests {
196196 let cmd = ClippyCmd :: new ( args) ;
197197 assert_eq ! ( "fix" , cmd. cargo_subcommand) ;
198198 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" ) ) ) ;
200200 }
201201
202202 #[ test]
0 commit comments