@@ -891,7 +891,7 @@ pub(crate) struct DistOptions<'a> {
891891 pub ( crate ) toolchain : & ' a ToolchainDesc ,
892892 pub ( crate ) profile : Profile ,
893893 pub ( crate ) update_hash : Option < & ' a Path > ,
894- pub ( crate ) dl_cfg : DownloadCfg < ' a > ,
894+ pub ( crate ) dl_cfg : DownloadCfg ,
895895 /// --force bool is whether to force an update/install
896896 pub ( crate ) force : bool ,
897897 /// --allow-downgrade
@@ -1066,7 +1066,7 @@ pub(crate) async fn update_from_dist(
10661066
10671067#[ allow( clippy:: too_many_arguments) ]
10681068async fn try_update_from_dist_ (
1069- download : DownloadCfg < ' _ > ,
1069+ download : DownloadCfg ,
10701070 update_hash : Option < & Path > ,
10711071 toolchain : & ToolchainDesc ,
10721072 profile : Option < Profile > ,
@@ -1215,9 +1215,9 @@ async fn try_update_from_dist_(
12151215 . update_v1 (
12161216 & manifest,
12171217 update_hash,
1218- Arc :: clone ( & download. tmp_cx ) ,
1218+ download. tmp_cx ,
12191219 download. notify_handler ,
1220- Arc :: new ( download. process ) ,
1220+ download. process ,
12211221 )
12221222 . await ;
12231223
@@ -1234,11 +1234,11 @@ async fn try_update_from_dist_(
12341234}
12351235
12361236pub ( crate ) async fn dl_v2_manifest (
1237- download : DownloadCfg < ' _ > ,
1237+ download : DownloadCfg ,
12381238 update_hash : Option < & Path > ,
12391239 toolchain : & ToolchainDesc ,
12401240) -> Result < Option < ( ManifestV2 , String ) > > {
1241- let manifest_url = toolchain. manifest_v2_url ( download. dist_root , download. process ) ;
1241+ let manifest_url = toolchain. manifest_v2_url ( & download. dist_root , & download. process ) ;
12421242 match download
12431243 . download_and_check ( & manifest_url, update_hash, ".toml" )
12441244 . await
@@ -1264,7 +1264,7 @@ pub(crate) async fn dl_v2_manifest(
12641264 // Manifest checksum mismatched.
12651265 warn ! ( "{err}" ) ;
12661266
1267- let server = dist_root_server ( download. process ) ?;
1267+ let server = dist_root_server ( & download. process ) ?;
12681268 if server == DEFAULT_DIST_SERVER {
12691269 info ! (
12701270 "this is likely due to an ongoing update of the official release server, please try again later"
@@ -1282,11 +1282,8 @@ pub(crate) async fn dl_v2_manifest(
12821282 }
12831283}
12841284
1285- async fn dl_v1_manifest (
1286- download : DownloadCfg < ' _ > ,
1287- toolchain : & ToolchainDesc ,
1288- ) -> Result < Vec < String > > {
1289- let root_url = toolchain. package_dir ( download. dist_root ) ;
1285+ async fn dl_v1_manifest ( download : DownloadCfg , toolchain : & ToolchainDesc ) -> Result < Vec < String > > {
1286+ let root_url = toolchain. package_dir ( & download. dist_root ) ;
12901287
12911288 if let Channel :: Version ( ver) = & toolchain. channel {
12921289 // This is an explicit version. In v1 there was no manifest,
@@ -1295,7 +1292,7 @@ async fn dl_v1_manifest(
12951292 return Ok ( vec ! [ installer_name] ) ;
12961293 }
12971294
1298- let manifest_url = toolchain. manifest_v1_url ( download. dist_root , download. process ) ;
1295+ let manifest_url = toolchain. manifest_v1_url ( & download. dist_root , & download. process ) ;
12991296 let manifest_dl = download. download_and_check ( & manifest_url, None , "" ) . await ?;
13001297 let ( manifest_file, _) = manifest_dl. unwrap ( ) ;
13011298 let manifest_str = utils:: read_file ( "manifest" , & manifest_file) ?;
0 commit comments