File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -189,17 +189,17 @@ impl Manifestation {
189
189
async move {
190
190
let _permit = sem. acquire ( ) . await . unwrap ( ) ;
191
191
self . download_component (
192
- component,
193
- format,
194
- url,
195
- hash,
192
+ & component,
193
+ & url,
194
+ & hash,
196
195
altered,
197
196
tmp_cx,
198
197
download_cfg,
199
198
max_retries,
200
199
new_manifest,
201
200
)
202
201
. await
202
+ . map ( |downloaded| ( component, format, downloaded, hash) )
203
203
}
204
204
} ) ;
205
205
if components_len > 0 {
@@ -535,22 +535,21 @@ impl Manifestation {
535
535
#[ allow( clippy:: too_many_arguments) ]
536
536
async fn download_component (
537
537
& self ,
538
- component : Component ,
539
- format : CompressionKind ,
540
- url : String ,
541
- hash : String ,
538
+ component : & Component ,
539
+ url : & str ,
540
+ hash : & str ,
542
541
altered : bool ,
543
542
tmp_cx : & temp:: Context ,
544
543
download_cfg : & DownloadCfg < ' _ > ,
545
544
max_retries : usize ,
546
545
new_manifest : & Manifest ,
547
- ) -> Result < ( Component , CompressionKind , File , String ) > {
546
+ ) -> Result < File > {
548
547
use tokio_retry:: { RetryIf , strategy:: FixedInterval } ;
549
548
550
549
let url = if altered {
551
550
url. replace ( DEFAULT_DIST_SERVER , tmp_cx. dist_server . as_str ( ) )
552
551
} else {
553
- url
552
+ url. to_owned ( )
554
553
} ;
555
554
556
555
let url_url = utils:: parse_url ( & url) ?;
@@ -573,7 +572,7 @@ impl Manifestation {
573
572
. await
574
573
. with_context ( || RustupError :: ComponentDownloadFailed ( component. name ( new_manifest) ) ) ?;
575
574
576
- Ok ( ( component , format , downloaded_file, hash ) )
575
+ Ok ( downloaded_file)
577
576
}
578
577
}
579
578
You can’t perform that action at this time.
0 commit comments