File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ pub(crate) async fn install(
452
452
}
453
453
}
454
454
455
- let install_res: Result < utils:: ExitCode > = ( || {
455
+ let install_res: Result < utils:: ExitCode > = async {
456
456
install_bins ( ) ?;
457
457
458
458
#[ cfg( unix) ]
@@ -472,10 +472,12 @@ pub(crate) async fn install(
472
472
opts. targets ,
473
473
verbose,
474
474
quiet,
475
- ) ?;
475
+ )
476
+ . await ?;
476
477
477
478
Ok ( utils:: ExitCode ( 0 ) )
478
- } ) ( ) ;
479
+ }
480
+ . await ;
479
481
480
482
if let Err ( e) = install_res {
481
483
report_error ( & e) ;
@@ -833,7 +835,7 @@ pub(crate) fn install_proxies() -> Result<()> {
833
835
Ok ( ( ) )
834
836
}
835
837
836
- fn maybe_install_rust (
838
+ async fn maybe_install_rust (
837
839
toolchain : Option < MaybeOfficialToolchainName > ,
838
840
profile_str : & str ,
839
841
default_host_triple : Option < & str > ,
@@ -863,16 +865,19 @@ fn maybe_install_rust(
863
865
// - delete the partial install and start over
864
866
// For now, we error.
865
867
let mut toolchain = DistributableToolchain :: new ( & cfg, desc. clone ( ) ) ?;
866
- utils:: run_future ( toolchain. update ( components, targets, cfg. get_profile ( ) ?) ) ?
868
+ toolchain
869
+ . update ( components, targets, cfg. get_profile ( ) ?)
870
+ . await ?
867
871
} else {
868
- utils :: run_future ( DistributableToolchain :: install (
872
+ DistributableToolchain :: install (
869
873
& cfg,
870
874
desc,
871
875
components,
872
876
targets,
873
877
cfg. get_profile ( ) ?,
874
878
true ,
875
- ) ) ?
879
+ )
880
+ . await ?
876
881
. 0
877
882
} ;
878
883
You can’t perform that action at this time.
0 commit comments