@@ -891,7 +891,7 @@ pub(crate) struct DistOptions<'a> {
891
891
pub ( crate ) toolchain : & ' a ToolchainDesc ,
892
892
pub ( crate ) profile : Profile ,
893
893
pub ( crate ) update_hash : Option < & ' a Path > ,
894
- pub ( crate ) dl_cfg : DownloadCfg < ' a > ,
894
+ pub ( crate ) dl_cfg : DownloadCfg ,
895
895
/// --force bool is whether to force an update/install
896
896
pub ( crate ) force : bool ,
897
897
/// --allow-downgrade
@@ -1066,7 +1066,7 @@ pub(crate) async fn update_from_dist(
1066
1066
1067
1067
#[ allow( clippy:: too_many_arguments) ]
1068
1068
async fn try_update_from_dist_ (
1069
- download : DownloadCfg < ' _ > ,
1069
+ download : DownloadCfg ,
1070
1070
update_hash : Option < & Path > ,
1071
1071
toolchain : & ToolchainDesc ,
1072
1072
profile : Option < Profile > ,
@@ -1215,9 +1215,9 @@ async fn try_update_from_dist_(
1215
1215
. update_v1 (
1216
1216
& manifest,
1217
1217
update_hash,
1218
- Arc :: clone ( & download. tmp_cx ) ,
1218
+ download. tmp_cx ,
1219
1219
download. notify_handler ,
1220
- Arc :: new ( download. process ) ,
1220
+ download. process ,
1221
1221
)
1222
1222
. await ;
1223
1223
@@ -1234,11 +1234,11 @@ async fn try_update_from_dist_(
1234
1234
}
1235
1235
1236
1236
pub ( crate ) async fn dl_v2_manifest (
1237
- download : DownloadCfg < ' _ > ,
1237
+ download : DownloadCfg ,
1238
1238
update_hash : Option < & Path > ,
1239
1239
toolchain : & ToolchainDesc ,
1240
1240
) -> 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 ) ;
1242
1242
match download
1243
1243
. download_and_check ( & manifest_url, update_hash, ".toml" )
1244
1244
. await
@@ -1264,7 +1264,7 @@ pub(crate) async fn dl_v2_manifest(
1264
1264
// Manifest checksum mismatched.
1265
1265
warn ! ( "{err}" ) ;
1266
1266
1267
- let server = dist_root_server ( download. process ) ?;
1267
+ let server = dist_root_server ( & download. process ) ?;
1268
1268
if server == DEFAULT_DIST_SERVER {
1269
1269
info ! (
1270
1270
"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(
1282
1282
}
1283
1283
}
1284
1284
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 ) ;
1290
1287
1291
1288
if let Channel :: Version ( ver) = & toolchain. channel {
1292
1289
// This is an explicit version. In v1 there was no manifest,
@@ -1295,7 +1292,7 @@ async fn dl_v1_manifest(
1295
1292
return Ok ( vec ! [ installer_name] ) ;
1296
1293
}
1297
1294
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 ) ;
1299
1296
let manifest_dl = download. download_and_check ( & manifest_url, None , "" ) . await ?;
1300
1297
let ( manifest_file, _) = manifest_dl. unwrap ( ) ;
1301
1298
let manifest_str = utils:: read_file ( "manifest" , & manifest_file) ?;
0 commit comments