Skip to content

Commit 99e6ad2

Browse files
fixup! feat(core): nurse clean up the global repository
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 4decc6b commit 99e6ad2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

coffee_core/src/coffee.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -575,18 +575,18 @@ impl PluginManager for CoffeeManager {
575575
}
576576

577577
Defect::CoffeeGlobalRepoCleanup(networks) => {
578-
for network in networks {
578+
let iter = self
579+
.repos
580+
.iter()
581+
.map(|(name, repo)| (name.to_owned(), repo.url()))
582+
.collect::<Vec<(String, URL)>>();
583+
for (network, _) in networks {
579584
log::debug!("reindexing repository for the network `{:?}`", network);
580-
let iter = self
581-
.repos
582-
.iter()
583-
.map(|(name, repo)| (name.to_owned(), repo.url()))
584-
.collect::<Vec<(String, URL)>>();
585-
for (name, url) in iter {
585+
for (name, url) in &iter {
586586
self.add_remote(&name, &url.url_string, true).await?;
587587
}
588588
nurse_actions
589-
.push(NurseStatus::MovingGlobalRepostoryTo(network.1.to_owned()));
589+
.push(NurseStatus::MovingGlobalRepostoryTo(network.to_owned()));
590590
}
591591
let global_repo = format!("{}/repositories", self.config.root_path);
592592
rm_dir_if_exist(&global_repo).await?;

0 commit comments

Comments
 (0)