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:
bjorn3 2022-05-13 12:20:32 +00:00
parent 065e202b56
commit 906b85157c
3 changed files with 20 additions and 28 deletions

View file

@ -66,11 +66,7 @@ fn emit_module(
let work_product = if backend_config.disable_incr_cache {
None
} else {
rustc_incremental::copy_cgu_workproduct_to_incr_comp_cache_dir(
tcx.sess,
&name,
Some(&tmp_file),
)
rustc_incremental::copy_cgu_workproduct_to_incr_comp_cache_dir(tcx.sess, &name, &tmp_file)
};
ModuleCodegenResult(