diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs index 347cd973eb8..ae8212b4084 100644 --- a/src/cli/rustup_mode.rs +++ b/src/cli/rustup_mode.rs @@ -1267,7 +1267,7 @@ async fn toolchain_link( if true { InstallMethod::Link { - src: &utils::to_absolute(src, &cfg.current_dir), + src: &cfg.current_dir.join(src), dest, cfg, } diff --git a/src/utils/utils.rs b/src/utils/utils.rs index a0b15c45de1..5dc3d53b60a 100644 --- a/src/utils/utils.rs +++ b/src/utils/utils.rs @@ -495,12 +495,6 @@ pub fn current_exe() -> Result { env::current_exe().context(RustupError::LocatingWorkingDir) } -pub(crate) fn to_absolute>(path: P, cwd: &Path) -> PathBuf { - let mut new = PathBuf::from(cwd); - new.push(path); - new -} - pub(crate) fn home_dir() -> Option { home::home_dir_with_env(&home_process()) }