@@ -631,7 +631,7 @@ pub async fn main() -> Result<utils::ExitCode> {
631
631
}
632
632
ToolchainSubcmd :: Uninstall { opts } => toolchain_remove ( cfg, opts) ,
633
633
} ,
634
- RustupSubcmd :: Check => check_updates ( cfg) ,
634
+ RustupSubcmd :: Check => check_updates ( cfg) . await ,
635
635
RustupSubcmd :: Default { toolchain } => default_ ( cfg, toolchain) ,
636
636
RustupSubcmd :: Target { subcmd } => match subcmd {
637
637
TargetSubcmd :: List {
@@ -749,14 +749,14 @@ fn default_(cfg: &Cfg, toolchain: Option<MaybeResolvableToolchainName>) -> Resul
749
749
Ok ( utils:: ExitCode ( 0 ) )
750
750
}
751
751
752
- fn check_updates ( cfg : & Cfg ) -> Result < utils:: ExitCode > {
752
+ async fn check_updates ( cfg : & Cfg ) -> Result < utils:: ExitCode > {
753
753
let mut t = process ( ) . stdout ( ) . terminal ( ) ;
754
754
let channels = cfg. list_channels ( ) ?;
755
755
756
756
for channel in channels {
757
757
let ( name, distributable) = channel;
758
758
let current_version = distributable. show_version ( ) ?;
759
- let dist_version = utils :: run_future ( distributable. show_dist_version ( ) ) ?;
759
+ let dist_version = distributable. show_dist_version ( ) . await ?;
760
760
let _ = t. attr ( terminalsource:: Attr :: Bold ) ;
761
761
write ! ( t. lock( ) , "{name} - " ) ?;
762
762
match ( current_version, dist_version) {
@@ -785,7 +785,7 @@ fn check_updates(cfg: &Cfg) -> Result<utils::ExitCode> {
785
785
}
786
786
}
787
787
788
- utils :: run_future ( check_rustup_update ( ) ) ?;
788
+ check_rustup_update ( ) . await ?;
789
789
790
790
Ok ( utils:: ExitCode ( 0 ) )
791
791
}
0 commit comments