Skip to content

Commit 5d6b9dc

Browse files
rbtcollinsdjc
authored andcommitted
Make target_add async
1 parent f251164 commit 5d6b9dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cli/rustup_mode.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ pub async fn main() -> Result<utils::ExitCode> {
638638
toolchain,
639639
installed,
640640
} => handle_epipe(target_list(cfg, toolchain, installed)),
641-
TargetSubcmd::Add { target, toolchain } => target_add(cfg, target, toolchain),
641+
TargetSubcmd::Add { target, toolchain } => target_add(cfg, target, toolchain).await,
642642
TargetSubcmd::Remove { target, toolchain } => {
643643
target_remove(cfg, target, toolchain).await
644644
}
@@ -1112,7 +1112,7 @@ fn target_list(
11121112
)
11131113
}
11141114

1115-
fn target_add(
1115+
async fn target_add(
11161116
cfg: &Cfg,
11171117
mut targets: Vec<String>,
11181118
toolchain: Option<PartialToolchainDesc>,
@@ -1155,7 +1155,7 @@ fn target_add(
11551155
Some(TargetTriple::new(target)),
11561156
false,
11571157
);
1158-
utils::run_future(distributable.add_component(new_component))?;
1158+
distributable.add_component(new_component).await?;
11591159
}
11601160

11611161
Ok(utils::ExitCode(0))

0 commit comments

Comments
 (0)