Factor Option out of copy_cgu_workproduct_to_incr_comp_cache_dir call
This improves clarity of the code a bit
This commit is contained in:
parent
065e202b56
commit
906b85157c
3 changed files with 20 additions and 28 deletions
|
@ -494,12 +494,12 @@ 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_deref();
|
||||
|
||||
if let Some((id, product)) =
|
||||
copy_cgu_workproduct_to_incr_comp_cache_dir(sess, &module.name, path)
|
||||
{
|
||||
work_products.insert(id, product);
|
||||
if let Some(path) = &module.object {
|
||||
if let Some((id, product)) =
|
||||
copy_cgu_workproduct_to_incr_comp_cache_dir(sess, &module.name, path)
|
||||
{
|
||||
work_products.insert(id, product);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue