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(
254
254
let paths = [
255
255
// Remove dep-info file generated by rustc. It is not tracked in
256
256
// file_types. It does not have a prefix.
257
- ( path_dash. clone ( ) , ".d" ) ,
257
+ ( path_dash, ".d" ) ,
258
258
// 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" ) ,
262
262
] ;
263
263
clean_ctx. rm_rf_prefix_list ( & dir_glob_str, & paths) ?;
264
264
}
@@ -347,14 +347,15 @@ impl<'gctx> CleanContext<'gctx> {
347
347
fn rm_rf_prefix_list (
348
348
& mut self ,
349
349
pattern : & str ,
350
- path_matchers : & [ ( Rc < str > , & str ) ] ,
350
+ path_matchers : & [ ( & str , & str ) ] ,
351
351
) -> CargoResult < ( ) > {
352
352
for path in glob:: glob ( pattern) ? {
353
353
let path = path?;
354
354
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
+ {
358
359
self . rm_rf ( & path) ?;
359
360
}
360
361
}
You can’t perform that action at this time.
0 commit comments