diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-05-13 12:18:13 +0000 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-06-06 12:32:08 +0000 |
| commit | 065e202b563b7f690b7cc79b8fb5a61150c2976e (patch) | |
| tree | b9d9272a04c591c172535088da39a40fb5a5d7b5 /compiler/rustc_incremental | |
| parent | 02162c4163f5d1a0e3dc8b552aafaa92d652b279 (diff) | |
| download | rust-065e202b563b7f690b7cc79b8fb5a61150c2976e.tar.gz rust-065e202b563b7f690b7cc79b8fb5a61150c2976e.zip | |
Avoid an unnecessary clone for copy_cgu_workproduct_to_incr_comp_cache_dir calls
Diffstat (limited to 'compiler/rustc_incremental')
| -rw-r--r-- | compiler/rustc_incremental/src/persist/work_product.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_incremental/src/persist/work_product.rs b/compiler/rustc_incremental/src/persist/work_product.rs index 85b44ed7531..54b06e56d24 100644 --- a/compiler/rustc_incremental/src/persist/work_product.rs +++ b/compiler/rustc_incremental/src/persist/work_product.rs @@ -7,13 +7,13 @@ use rustc_fs_util::link_or_copy; use rustc_middle::dep_graph::{WorkProduct, WorkProductId}; use rustc_session::Session; use std::fs as std_fs; -use std::path::PathBuf; +use std::path::Path; /// Copies a CGU work product to the incremental compilation directory, so next compilation can find and reuse it. pub fn copy_cgu_workproduct_to_incr_comp_cache_dir( sess: &Session, cgu_name: &str, - path: &Option<PathBuf>, + path: Option<&Path>, ) -> Option<(WorkProductId, WorkProduct)> { debug!("copy_cgu_workproduct_to_incr_comp_cache_dir({:?},{:?})", cgu_name, path); sess.opts.incremental.as_ref()?; |
