From 90e6bc6d016d4c42c8b1f1239f01ed88e817589c Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Thu, 20 Jun 2019 14:03:09 +0200 Subject: [PATCH 1/2] Remove needless lifetimes --- src/cargo/ops/common_for_install_and_uninstall.rs | 2 +- src/cargo/util/config.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/ops/common_for_install_and_uninstall.rs b/src/cargo/ops/common_for_install_and_uninstall.rs index 12e435864d0..23f4e848586 100644 --- a/src/cargo/ops/common_for_install_and_uninstall.rs +++ b/src/cargo/ops/common_for_install_and_uninstall.rs @@ -545,7 +545,7 @@ pub fn resolve_root(flag: Option<&str>, config: &Config) -> CargoResult(source_id: SourceId, config: &'a Config) -> CargoResult> { +pub fn path_source(source_id: SourceId, config: &Config) -> CargoResult { let path = source_id .url() .to_file_path() diff --git a/src/cargo/util/config.rs b/src/cargo/util/config.rs index 44628ee9038..8042a3f79f2 100644 --- a/src/cargo/util/config.rs +++ b/src/cargo/util/config.rs @@ -872,7 +872,7 @@ impl Config { /// This lock is global per-process and can be acquired recursively. An RAII /// structure is returned to release the lock, and if this process /// abnormally terminates the lock is also released. - pub fn acquire_package_cache_lock<'a>(&'a self) -> CargoResult> { + pub fn acquire_package_cache_lock(&self) -> CargoResult { let mut slot = self.package_cache_lock.borrow_mut(); match *slot { // We've already acquired the lock in this process, so simply bump From e97fef02390df9d4748dbe820ba5ffe3916a77e4 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Thu, 20 Jun 2019 16:46:46 +0200 Subject: [PATCH 2/2] Indicate anonymous lifetime --- src/cargo/ops/common_for_install_and_uninstall.rs | 2 +- src/cargo/util/config.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/ops/common_for_install_and_uninstall.rs b/src/cargo/ops/common_for_install_and_uninstall.rs index 23f4e848586..498caee3e62 100644 --- a/src/cargo/ops/common_for_install_and_uninstall.rs +++ b/src/cargo/ops/common_for_install_and_uninstall.rs @@ -545,7 +545,7 @@ pub fn resolve_root(flag: Option<&str>, config: &Config) -> CargoResult CargoResult { +pub fn path_source(source_id: SourceId, config: &Config) -> CargoResult> { let path = source_id .url() .to_file_path() diff --git a/src/cargo/util/config.rs b/src/cargo/util/config.rs index 8042a3f79f2..22d5a541d61 100644 --- a/src/cargo/util/config.rs +++ b/src/cargo/util/config.rs @@ -872,7 +872,7 @@ impl Config { /// This lock is global per-process and can be acquired recursively. An RAII /// structure is returned to release the lock, and if this process /// abnormally terminates the lock is also released. - pub fn acquire_package_cache_lock(&self) -> CargoResult { + pub fn acquire_package_cache_lock(&self) -> CargoResult> { let mut slot = self.package_cache_lock.borrow_mut(); match *slot { // We've already acquired the lock in this process, so simply bump