Skip to content

Commit 86a03bc

Browse files
committed
Inline trivial wrapper function
1 parent d05498e commit 86a03bc

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/currentprocess.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,6 @@ impl From<TestProcess> for Process {
159159

160160
/// Obtain the current instance of CurrentProcess
161161
pub fn process() -> Process {
162-
home_process()
163-
}
164-
165-
/// Obtain the current instance of HomeProcess
166-
pub(crate) fn home_process() -> Process {
167162
match PROCESS.with(|p| p.borrow().clone()) {
168163
None => panic!("No process instance"),
169164
Some(p) => p,

src/utils/utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use retry::{retry, OperationResult};
1111
use sha2::Sha256;
1212
use url::Url;
1313

14-
use crate::currentprocess::{home_process, process};
14+
use crate::currentprocess::process;
1515
use crate::errors::*;
1616
use crate::utils::notifications::Notification;
1717
use crate::utils::raw;
@@ -496,15 +496,15 @@ pub fn current_exe() -> Result<PathBuf> {
496496
}
497497

498498
pub(crate) fn home_dir() -> Option<PathBuf> {
499-
home::home_dir_with_env(&home_process())
499+
home::home_dir_with_env(&process())
500500
}
501501

502502
pub(crate) fn cargo_home() -> Result<PathBuf> {
503-
home::cargo_home_with_env(&home_process()).context("failed to determine cargo home")
503+
home::cargo_home_with_env(&process()).context("failed to determine cargo home")
504504
}
505505

506506
pub(crate) fn rustup_home() -> Result<PathBuf> {
507-
home::rustup_home_with_env(&home_process()).context("failed to determine rustup home dir")
507+
home::rustup_home_with_env(&process()).context("failed to determine rustup home dir")
508508
}
509509

510510
pub(crate) fn format_path_for_display(path: &str) -> String {

0 commit comments

Comments
 (0)