Skip to content

Commit 4aa2626

Browse files
rbtcollinsdjc
authored andcommitted
Make update_all_channels async
1 parent 1f583ca commit 4aa2626

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/cli/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ fn show_channel_updates(
285285
Ok(())
286286
}
287287

288-
pub(crate) fn update_all_channels(
288+
pub(crate) async fn update_all_channels(
289289
cfg: &Cfg,
290290
do_self_update: bool,
291291
force_update: bool,
@@ -310,7 +310,7 @@ pub(crate) fn update_all_channels(
310310
};
311311

312312
if do_self_update {
313-
utils::run_future(self_update(show_channel_updates))
313+
self_update(show_channel_updates).await
314314
} else {
315315
show_channel_updates()
316316
}

src/cli/rustup_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ fn update(cfg: &mut Cfg, opts: UpdateOpts) -> Result<utils::ExitCode> {
873873
utils::run_future(common::self_update(|| Ok(utils::ExitCode(0))))?;
874874
}
875875
} else {
876-
common::update_all_channels(cfg, self_update, opts.force)?;
876+
utils::run_future(common::update_all_channels(cfg, self_update, opts.force))?;
877877
info!("cleaning up downloads & tmp directories");
878878
utils::delete_dir_contents_following_links(&cfg.download_dir);
879879
cfg.tmp_cx.clean();

0 commit comments

Comments
 (0)