Skip to content

Commit ae64d51

Browse files
committed
Inline trivial single-use function utils::to_absolute()
1 parent b8fa753 commit ae64d51

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/cli/rustup_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ async fn toolchain_link(
12671267

12681268
if true {
12691269
InstallMethod::Link {
1270-
src: &utils::to_absolute(src, &cfg.current_dir),
1270+
src: &cfg.current_dir.join(src),
12711271
dest,
12721272
cfg,
12731273
}

src/utils/utils.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,6 @@ pub fn current_exe() -> Result<PathBuf> {
495495
env::current_exe().context(RustupError::LocatingWorkingDir)
496496
}
497497

498-
pub(crate) fn to_absolute<P: AsRef<Path>>(path: P, cwd: &Path) -> PathBuf {
499-
let mut new = PathBuf::from(cwd);
500-
new.push(path);
501-
new
502-
}
503-
504498
pub(crate) fn home_dir() -> Option<PathBuf> {
505499
home::home_dir_with_env(&home_process())
506500
}

0 commit comments

Comments
 (0)