mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 00:01:00 +00:00
fix clippy
This commit is contained in:
committed by
Clément Renault
parent
7e52f1effb
commit
9c00b159ba
@ -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 {
|
||||
|
Reference in New Issue
Block a user