Skip to content

Commit 526cb43

Browse files
committed
refactor(dist/manifestation): remove redundant redeclarations
1 parent be2d34f commit 526cb43

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/dist/manifestation.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ impl Manifestation {
216216
tx = self.uninstall_component(component, &new_manifest, tx)?;
217217
}
218218

219-
let mut tx = if !components.is_empty() {
219+
if !components.is_empty() {
220220
info!("downloading component(s)");
221221
let mut stream = InstallEvents::new(components.into_iter(), Arc::new(self));
222222
let mut transaction = Some(tx);
223-
let tx = loop {
223+
tx = loop {
224224
// Refill downloads when there's capacity
225225
// Must live outside of `InstallEvents` because we can't write the type of future
226226
while stream.components.len() > 0 && stream.downloads.len() < concurrent_downloads {
@@ -246,10 +246,7 @@ impl Manifestation {
246246

247247
download_cfg.clean(&stream.cleanup_downloads)?;
248248
drop(stream);
249-
tx
250-
} else {
251-
tx
252-
};
249+
}
253250

254251
// Install new distribution manifest
255252
let new_manifest_str = new_manifest.clone().stringify()?;

0 commit comments

Comments
 (0)