Skip to content

Commit

Permalink
fix clippy::map_clone: use .cloned() instead of .map(|x| x.clone())
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Aug 7, 2020
1 parent 4ba1a19 commit 15dcda3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/back/write.rs
Expand Up @@ -490,7 +490,7 @@ fn copy_all_cgu_workproducts_to_incr_comp_cache_dir(
let _timer = sess.timer("copy_all_cgu_workproducts_to_incr_comp_cache_dir");

for module in compiled_modules.modules.iter().filter(|m| m.kind == ModuleKind::Regular) {
let path = module.object.as_ref().map(|path| path.clone());
let path = module.object.as_ref().cloned();

if let Some((id, product)) =
copy_cgu_workproduct_to_incr_comp_cache_dir(sess, &module.name, &path)
Expand Down

0 comments on commit 15dcda3

Please sign in to comment.