File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -724,7 +724,7 @@ pub(crate) fn update_from_dist(
724
724
std:: fs:: remove_file ( update_hash. unwrap ( ) ) ?;
725
725
}
726
726
727
- let res = update_from_dist_ (
727
+ let res = utils :: run_future ( update_from_dist_ (
728
728
download,
729
729
update_hash,
730
730
toolchain,
@@ -735,7 +735,7 @@ pub(crate) fn update_from_dist(
735
735
old_date,
736
736
components,
737
737
targets,
738
- ) ;
738
+ ) ) ;
739
739
740
740
// Don't leave behind an empty / broken installation directory
741
741
if res. is_err ( ) && fresh_install {
@@ -746,7 +746,7 @@ pub(crate) fn update_from_dist(
746
746
res
747
747
}
748
748
749
- fn update_from_dist_ (
749
+ async fn update_from_dist_ (
750
750
download : DownloadCfg < ' _ > ,
751
751
update_hash : Option < & Path > ,
752
752
toolchain : & ToolchainDesc ,
@@ -802,7 +802,7 @@ fn update_from_dist_(
802
802
} ;
803
803
804
804
loop {
805
- match utils :: run_future ( try_update_from_dist_ (
805
+ match try_update_from_dist_ (
806
806
download,
807
807
update_hash,
808
808
& toolchain,
@@ -812,7 +812,9 @@ fn update_from_dist_(
812
812
components,
813
813
targets,
814
814
& mut fetched,
815
- ) ) {
815
+ )
816
+ . await
817
+ {
816
818
Ok ( v) => break Ok ( v) ,
817
819
Err ( e) => {
818
820
if !backtrack {
You can’t perform that action at this time.
0 commit comments