File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -254,11 +254,11 @@ fn clean_specs(
254254 let paths = [
255255 // Remove dep-info file generated by rustc. It is not tracked in
256256 // file_types. It does not have a prefix.
257- ( path_dash. clone ( ) , ".d" ) ,
257+ ( path_dash, ".d" ) ,
258258 // Remove split-debuginfo files generated by rustc.
259- ( path_dot. clone ( ) , ".o" ) ,
260- ( path_dot. clone ( ) , ".dwo" ) ,
261- ( path_dot. clone ( ) , ".dwp" ) ,
259+ ( path_dot, ".o" ) ,
260+ ( path_dot, ".dwo" ) ,
261+ ( path_dot, ".dwp" ) ,
262262 ] ;
263263 clean_ctx. rm_rf_prefix_list ( & dir_glob_str, & paths) ?;
264264 }
@@ -347,14 +347,15 @@ impl<'gctx> CleanContext<'gctx> {
347347 fn rm_rf_prefix_list (
348348 & mut self ,
349349 pattern : & str ,
350- path_matchers : & [ ( Rc < str > , & str ) ] ,
350+ path_matchers : & [ ( & str , & str ) ] ,
351351 ) -> CargoResult < ( ) > {
352352 for path in glob:: glob ( pattern) ? {
353353 let path = path?;
354354 let filename = path. file_name ( ) . and_then ( |name| name. to_str ( ) ) . unwrap ( ) ;
355- if path_matchers. iter ( ) . any ( |( prefix, suffix) | {
356- filename. starts_with ( & * * prefix) && filename. ends_with ( suffix)
357- } ) {
355+ if path_matchers
356+ . iter ( )
357+ . any ( |( prefix, suffix) | filename. starts_with ( prefix) && filename. ends_with ( suffix) )
358+ {
358359 self . rm_rf ( & path) ?;
359360 }
360361 }
You can’t perform that action at this time.
0 commit comments