Skip to content

Commit f251164

Browse files
rbtcollinsdjc
authored andcommitted
Make target_remove async
1 parent 4709d7c commit f251164

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cli/rustup_mode.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,9 @@ pub async fn main() -> Result<utils::ExitCode> {
639639
installed,
640640
} => handle_epipe(target_list(cfg, toolchain, installed)),
641641
TargetSubcmd::Add { target, toolchain } => target_add(cfg, target, toolchain),
642-
TargetSubcmd::Remove { target, toolchain } => target_remove(cfg, target, toolchain),
642+
TargetSubcmd::Remove { target, toolchain } => {
643+
target_remove(cfg, target, toolchain).await
644+
}
643645
},
644646
RustupSubcmd::Component { subcmd } => match subcmd {
645647
ComponentSubcmd::List {
@@ -1159,7 +1161,7 @@ fn target_add(
11591161
Ok(utils::ExitCode(0))
11601162
}
11611163

1162-
fn target_remove(
1164+
async fn target_remove(
11631165
cfg: &Cfg,
11641166
targets: Vec<String>,
11651167
toolchain: Option<PartialToolchainDesc>,
@@ -1187,7 +1189,7 @@ fn target_remove(
11871189
warn!("after removing the last target, no build targets will be available");
11881190
}
11891191
let new_component = Component::new("rust-std".to_string(), Some(target), false);
1190-
utils::run_future(distributable.remove_component(new_component))?;
1192+
distributable.remove_component(new_component).await?;
11911193
}
11921194

11931195
Ok(utils::ExitCode(0))

0 commit comments

Comments
 (0)