fix clippy

This commit is contained in:
Irevoire 2022-10-25 10:58:55 +02:00
parent 2a1f4ac4d9
commit 4dabd2b8e7
No known key found for this signature in database
GPG key ID: 7A6A970C96104F1B
2 changed files with 9 additions and 11 deletions

View file

@ -258,18 +258,15 @@ pub fn swap_index_uid_in_task(task: &mut Task, swap: (&str, &str)) {
| K::DumpCreation { .. }
| K::Snapshot => {}
};
match &mut task.details {
Some(Details::IndexSwap { swaps }) => {
for (lhs, rhs) in swaps.iter_mut() {
if lhs == swap.0 || lhs == swap.1 {
index_uids.push(lhs);
}
if rhs == swap.0 || rhs == swap.1 {
index_uids.push(rhs);
}
if let Some(Details::IndexSwap { swaps }) = &mut task.details {
for (lhs, rhs) in swaps.iter_mut() {
if lhs == swap.0 || lhs == swap.1 {
index_uids.push(lhs);
}
if rhs == swap.0 || rhs == swap.1 {
index_uids.push(rhs);
}
}
_ => (),
}
for index_uid in index_uids {
if index_uid == swap.0 {