Skip to content

Commit 0208b6d

Browse files
committed
Remove noop functions in favor of conditional compilation
1 parent cf63374 commit 0208b6d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/cli/self_update.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ pub(crate) async fn install(
469469
do_write_env_files()?;
470470

471471
if !opts.no_modify_path {
472+
#[cfg(windows)]
472473
do_add_to_programs()?;
473474
do_add_to_path()?;
474475
}
@@ -1022,6 +1023,7 @@ pub(crate) fn uninstall(no_prompt: bool) -> Result<utils::ExitCode> {
10221023

10231024
// Remove CARGO_HOME/bin from PATH
10241025
do_remove_from_path()?;
1026+
#[cfg(windows)]
10251027
do_remove_from_programs()?;
10261028

10271029
// Delete everything in CARGO_HOME *except* the rustup bin

src/cli/self_update/unix.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,6 @@ pub(crate) fn do_write_env_files() -> Result<()> {
123123
Ok(())
124124
}
125125

126-
pub(crate) fn do_add_to_programs() -> Result<()> {
127-
Ok(())
128-
}
129-
130-
pub(crate) fn do_remove_from_programs() -> Result<()> {
131-
Ok(())
132-
}
133-
134126
/// Tell the upgrader to replace the rustup bins, then delete
135127
/// itself.
136128
pub(crate) fn run_update(setup_path: &Path) -> Result<utils::ExitCode> {

0 commit comments

Comments
 (0)