@@ -469,16 +469,6 @@ impl TestContext {
469469 }
470470 }
471471
472- fn default_dl_cfg ( & self ) -> DownloadCfg < ' _ > {
473- DownloadCfg {
474- dist_root : "phony" ,
475- tmp_cx : & self . tmp_cx ,
476- download_dir : & self . download_dir ,
477- notify_handler : & |event| println ! ( "{event}" ) ,
478- process : & self . tp . process ,
479- }
480- }
481-
482472 // Installs or updates a toolchain from a dist server. If an initial
483473 // install then it will be installed with the default components. If
484474 // an upgrade then all the existing components will be upgraded.
@@ -489,17 +479,14 @@ impl TestContext {
489479 remove : & [ Component ] ,
490480 force : bool ,
491481 ) -> Result < UpdateStatus > {
492- self . update_from_dist_with_dl_cfg ( add, remove, force, & self . default_dl_cfg ( ) )
493- . await
494- }
482+ let dl_cfg = DownloadCfg {
483+ dist_root : "phony" ,
484+ tmp_cx : & self . tmp_cx ,
485+ download_dir : & self . download_dir ,
486+ notify_handler : & |event| println ! ( "{event}" ) ,
487+ process : & self . tp . process ,
488+ } ;
495489
496- async fn update_from_dist_with_dl_cfg (
497- & self ,
498- add : & [ Component ] ,
499- remove : & [ Component ] ,
500- force : bool ,
501- dl_cfg : & DownloadCfg < ' _ > ,
502- ) -> Result < UpdateStatus > {
503490 // Download the dist manifest and place it into the installation prefix
504491 let manifest_url = make_manifest_url ( & self . url , & self . toolchain ) ?;
505492 let manifest_file = self . tmp_cx . new_file ( ) ?;
@@ -526,7 +513,7 @@ impl TestContext {
526513 & manifest,
527514 changes,
528515 force,
529- dl_cfg,
516+ & dl_cfg,
530517 & self . toolchain . manifest_name ( ) ,
531518 true ,
532519 )
0 commit comments