Skip to content

Commit 2b4cf31

Browse files
rbtcollinsdjc
authored andcommitted
Make update_v1 async
1 parent f2e4704 commit 2b4cf31

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/dist/dist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,12 +1043,12 @@ fn try_update_from_dist_(
10431043
}
10441044
}
10451045
};
1046-
let result = manifestation.update_v1(
1046+
let result = utils::run_future(manifestation.update_v1(
10471047
&manifest,
10481048
update_hash,
10491049
download.tmp_cx,
10501050
&download.notify_handler,
1051-
);
1051+
));
10521052
// inspect, determine what context to add, then process afterwards.
10531053
let mut download_not_exists = false;
10541054
match &result {

src/dist/manifestation.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl Manifestation {
378378
}
379379

380380
/// Installation using the legacy v1 manifest format
381-
pub(crate) fn update_v1(
381+
pub(crate) async fn update_v1(
382382
&self,
383383
new_manifest: &[String],
384384
update_hash: Option<&Path>,
@@ -421,7 +421,9 @@ impl Manifestation {
421421
notify_handler,
422422
};
423423

424-
let dl = utils::run_future(dlcfg.download_and_check(&url, update_hash, ".tar.gz"))?;
424+
let dl = dlcfg
425+
.download_and_check(&url, update_hash, ".tar.gz")
426+
.await?;
425427
if dl.is_none() {
426428
return Ok(None);
427429
};

0 commit comments

Comments
 (0)