@@ -139,17 +139,6 @@ impl<'a> Toolchain<'a> {
139
139
Ok ( ( ) )
140
140
}
141
141
142
- // XXX: Move to Config with a notify handler parameter
143
- fn download_cfg ( & self ) -> DownloadCfg < ' _ > {
144
- DownloadCfg {
145
- dist_root : & self . cfg . dist_root_url ,
146
- temp_cfg : & self . cfg . temp_cfg ,
147
- download_dir : & self . cfg . download_dir ,
148
- notify_handler : & * self . dist_handler ,
149
- pgp_keys : self . cfg . get_pgp_keys ( ) ,
150
- }
151
- }
152
-
153
142
// Custom only
154
143
pub fn is_custom ( & self ) -> bool {
155
144
ToolchainDesc :: from_str ( & self . name ) . is_err ( )
@@ -531,8 +520,8 @@ impl<'a> DistributableToolchain<'a> {
531
520
& manifest,
532
521
changes,
533
522
false ,
534
- & self . 0 . download_cfg ( ) ,
535
- & self . 0 . download_cfg ( ) . notify_handler ,
523
+ & self . download_cfg ( ) ,
524
+ & self . download_cfg ( ) . notify_handler ,
536
525
& toolchain. manifest_name ( ) ,
537
526
false ,
538
527
) ?;
@@ -601,6 +590,10 @@ impl<'a> DistributableToolchain<'a> {
601
590
Ok ( ToolchainDesc :: from_str ( & self . 0 . name ) ?)
602
591
}
603
592
593
+ fn download_cfg ( & self ) -> DownloadCfg < ' _ > {
594
+ self . 0 . cfg . download_cfg ( & * self . 0 . dist_handler )
595
+ }
596
+
604
597
// Installed only?
605
598
fn get_component_suggestion (
606
599
& self ,
@@ -714,7 +707,7 @@ impl<'a> DistributableToolchain<'a> {
714
707
desc : & self . desc ( ) ?,
715
708
profile : self . 0 . cfg . get_profile ( ) ?,
716
709
update_hash : Some ( & update_hash) ,
717
- dl_cfg : self . 0 . download_cfg ( ) ,
710
+ dl_cfg : self . download_cfg ( ) ,
718
711
force_update,
719
712
allow_downgrade,
720
713
exists : self . 0 . exists ( ) ,
@@ -735,7 +728,7 @@ impl<'a> DistributableToolchain<'a> {
735
728
desc : & self . desc ( ) ?,
736
729
profile : self . 0 . cfg . get_profile ( ) ?,
737
730
update_hash : Some ( & update_hash) ,
738
- dl_cfg : self . 0 . download_cfg ( ) ,
731
+ dl_cfg : self . download_cfg ( ) ,
739
732
force_update : false ,
740
733
allow_downgrade : false ,
741
734
exists : false ,
@@ -862,8 +855,8 @@ impl<'a> DistributableToolchain<'a> {
862
855
& manifest,
863
856
changes,
864
857
false ,
865
- & self . 0 . download_cfg ( ) ,
866
- & self . 0 . download_cfg ( ) . notify_handler ,
858
+ & self . download_cfg ( ) ,
859
+ & self . download_cfg ( ) . notify_handler ,
867
860
& toolchain. manifest_name ( ) ,
868
861
false ,
869
862
) ?;
@@ -879,7 +872,7 @@ impl<'a> DistributableToolchain<'a> {
879
872
let update_hash = self . update_hash ( ) ?;
880
873
881
874
match crate :: dist:: dist:: dl_v2_manifest (
882
- self . 0 . download_cfg ( ) ,
875
+ self . download_cfg ( ) ,
883
876
Some ( & update_hash) ,
884
877
& self . desc ( ) ?,
885
878
) ? {
0 commit comments