From 55deda01bb07303cb5330abf8cf6e3870de92959 Mon Sep 17 00:00:00 2001 From: Hanif Bin Ariffin Date: Tue, 1 Oct 2019 14:16:58 -0400 Subject: [PATCH] Removed redundant borrow As described here https://rust-lang.github.io/rust-clippy/master/#needless_borrow. rust-clippy is complaining that the related borrows are unnecessary. --- src/cargo/ops/cargo_install.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cargo/ops/cargo_install.rs b/src/cargo/ops/cargo_install.rs index 954332a2cbc..c1bce3ef2e0 100644 --- a/src/cargo/ops/cargo_install.rs +++ b/src/cargo/ops/cargo_install.rs @@ -287,7 +287,7 @@ fn install_one( } else { let tracker = InstallTracker::load(config, root)?; let (freshness, _duplicates) = - tracker.check_upgrade(&dst, pkg, force, opts, &target, &rustc.verbose_version)?; + tracker.check_upgrade(&dst, pkg, force, opts, target, &rustc.verbose_version)?; if freshness == Freshness::Fresh { let msg = format!( "package `{}` is already installed, use --force to override", @@ -341,7 +341,7 @@ fn install_one( } else { let tracker = InstallTracker::load(config, root)?; let (_freshness, duplicates) = - tracker.check_upgrade(&dst, pkg, force, opts, &target, &rustc.verbose_version)?; + tracker.check_upgrade(&dst, pkg, force, opts, target, &rustc.verbose_version)?; (Some(tracker), duplicates) }; @@ -408,7 +408,7 @@ fn install_one( &successful_bins, vers.map(|s| s.to_string()), opts, - &target, + target, &rustc.verbose_version, );