Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions red4-conflicts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,13 @@ impl TemplateApp {
// update vms
// add this file to all previous archive's losing files
for archive in archive_names.iter() {
if !self.archives.get(archive).unwrap().loses.contains(hash) {
self.archives.get_mut(archive).unwrap().loses.push(*hash);
let archive_vm = self.archives.get_mut(archive).unwrap();
if !archive_vm.loses.contains(hash) {
archive_vm.loses.push(*hash);
}
// remove from wins if previously marked as winning
if let Some(pos) = archive_vm.wins.iter().position(|w| w == hash) {
archive_vm.wins.remove(pos);
}
}
// add the current archive to the list of conflicting archives last
Expand Down