From 065e202b563b7f690b7cc79b8fb5a61150c2976e Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 13 May 2022 12:18:13 +0000 Subject: Avoid an unnecessary clone for copy_cgu_workproduct_to_incr_comp_cache_dir calls --- compiler/rustc_incremental/src/persist/work_product.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_incremental') 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, + path: Option<&Path>, ) -> Option<(WorkProductId, WorkProduct)> { debug!("copy_cgu_workproduct_to_incr_comp_cache_dir({:?},{:?})", cgu_name, path); sess.opts.incremental.as_ref()?; -- cgit 1.4.1-3-g733a5