mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 08:11:04 +00:00
Apply code review suggestions
This commit is contained in:
committed by
Clément Renault
parent
e9cd6cbbee
commit
4d25c159e6
@ -259,20 +259,17 @@ pub fn swap_index_uid_in_task(task: &mut Task, swap: (&str, &str)) {
|
||||
| K::Snapshot => {}
|
||||
};
|
||||
match &mut task.details {
|
||||
Some(details) => match details {
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
None => {}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
for index_uid in index_uids {
|
||||
if index_uid == swap.0 {
|
||||
|
Reference in New Issue
Block a user