Merge pull request #791 from sbellem/fix-790

Fix #790
This commit is contained in:
bunnie 2026-01-29 03:10:17 +08:00 committed by GitHub
commit 4b8079c7bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -482,7 +482,8 @@ impl Builder {
}
if dup_indices.len() > 0 {
println!("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
for (dupe_ns, dupe_i) in dup_indices {
// Remove in reverse order to keep indices valid after each removal
for (dupe_ns, dupe_i) in dup_indices.into_iter().rev() {
let removed =
if dupe_ns == 0 { self.services.remove(dupe_i) } else { self.apps.remove(dupe_i) };
println!("WARNING: Found duplicate package name, removing later instances of {:?}", removed);