Skip to content

Commit 4709d7c

Browse files
rbtcollinsdjc
authored andcommitted
Make component_add async
1 parent 1a0511d commit 4709d7c

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
@@ -650,7 +650,7 @@ pub async fn main() -> Result<utils::ExitCode> {
650650
component,
651651
toolchain,
652652
target,
653-
} => component_add(cfg, component, toolchain, target),
653+
} => component_add(cfg, component, toolchain, target).await,
654654
ComponentSubcmd::Remove {
655655
component,
656656
toolchain,
@@ -1204,7 +1204,7 @@ fn component_list(
12041204
Ok(utils::ExitCode(0))
12051205
}
12061206

1207-
fn component_add(
1207+
async fn component_add(
12081208
cfg: &Cfg,
12091209
components: Vec<String>,
12101210
toolchain: Option<PartialToolchainDesc>,
@@ -1215,7 +1215,7 @@ fn component_add(
12151215

12161216
for component in &components {
12171217
let new_component = Component::try_new(component, &distributable, target.as_ref())?;
1218-
utils::run_future(distributable.add_component(new_component))?;
1218+
distributable.add_component(new_component).await?;
12191219
}
12201220

12211221
Ok(utils::ExitCode(0))

0 commit comments

Comments
 (0)