File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -1185,7 +1185,7 @@ fn target_remove(
1185
1185
warn ! ( "after removing the last target, no build targets will be available" ) ;
1186
1186
}
1187
1187
let new_component = Component :: new ( "rust-std" . to_string ( ) , Some ( target) , false ) ;
1188
- distributable. remove_component ( new_component) ?;
1188
+ utils :: run_future ( distributable. remove_component ( new_component) ) ?;
1189
1189
}
1190
1190
1191
1191
Ok ( utils:: ExitCode ( 0 ) )
@@ -1239,7 +1239,7 @@ fn component_remove(
1239
1239
1240
1240
for component in & components {
1241
1241
let new_component = Component :: try_new ( component, & distributable, target. as_ref ( ) ) ?;
1242
- distributable. remove_component ( new_component) ?;
1242
+ utils :: run_future ( distributable. remove_component ( new_component) ) ?;
1243
1243
}
1244
1244
1245
1245
Ok ( utils:: ExitCode ( 0 ) )
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ use crate::{
16
16
} ,
17
17
install:: { InstallMethod , UpdateStatus } ,
18
18
notifications:: Notification ,
19
- utils:: utils,
20
19
RustupError ,
21
20
} ;
22
21
@@ -469,7 +468,7 @@ impl<'a> DistributableToolchain<'a> {
469
468
}
470
469
}
471
470
472
- pub ( crate ) fn remove_component ( & self , mut component : Component ) -> anyhow:: Result < ( ) > {
471
+ pub ( crate ) async fn remove_component ( & self , mut component : Component ) -> anyhow:: Result < ( ) > {
473
472
// TODO: take multiple components?
474
473
let manifestation = self . get_manifestation ( ) ?;
475
474
let config = manifestation. read_config ( ) ?. unwrap_or_default ( ) ;
@@ -518,14 +517,16 @@ impl<'a> DistributableToolchain<'a> {
518
517
& |n : crate :: dist:: Notification < ' _ > | ( self . cfg . notify_handler ) ( n. into ( ) ) ;
519
518
let download_cfg = self . cfg . download_cfg ( & notify_handler) ;
520
519
521
- utils:: run_future ( manifestation. update (
522
- & manifest,
523
- changes,
524
- false ,
525
- & download_cfg,
526
- & self . desc . manifest_name ( ) ,
527
- false ,
528
- ) ) ?;
520
+ manifestation
521
+ . update (
522
+ & manifest,
523
+ changes,
524
+ false ,
525
+ & download_cfg,
526
+ & self . desc . manifest_name ( ) ,
527
+ false ,
528
+ )
529
+ . await ?;
529
530
530
531
Ok ( ( ) )
531
532
}
You can’t perform that action at this time.
0 commit comments