mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 14:54:27 +01:00
fix clippy
This commit is contained in:
parent
7e52f1effb
commit
9c00b159ba
@ -258,8 +258,7 @@ pub fn swap_index_uid_in_task(task: &mut Task, swap: (&str, &str)) {
|
|||||||
| K::DumpCreation { .. }
|
| K::DumpCreation { .. }
|
||||||
| K::Snapshot => {}
|
| K::Snapshot => {}
|
||||||
};
|
};
|
||||||
match &mut task.details {
|
if let Some(Details::IndexSwap { swaps }) = &mut task.details {
|
||||||
Some(Details::IndexSwap { swaps }) => {
|
|
||||||
for (lhs, rhs) in swaps.iter_mut() {
|
for (lhs, rhs) in swaps.iter_mut() {
|
||||||
if lhs == swap.0 || lhs == swap.1 {
|
if lhs == swap.0 || lhs == swap.1 {
|
||||||
index_uids.push(lhs);
|
index_uids.push(lhs);
|
||||||
@ -269,8 +268,6 @@ pub fn swap_index_uid_in_task(task: &mut Task, swap: (&str, &str)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
for index_uid in index_uids {
|
for index_uid in index_uids {
|
||||||
if index_uid == swap.0 {
|
if index_uid == swap.0 {
|
||||||
*index_uid = swap.1.to_owned();
|
*index_uid = swap.1.to_owned();
|
||||||
|
@ -40,7 +40,8 @@ pub fn default_snapshot_settings_for_test<'a>(
|
|||||||
Cow::Owned(format!("{counter}"))
|
Cow::Owned(format!("{counter}"))
|
||||||
};
|
};
|
||||||
|
|
||||||
let store_whole_snapshot = std::env::var("MEILI_TEST_FULL_SNAPS").unwrap_or("false".to_owned());
|
let store_whole_snapshot =
|
||||||
|
std::env::var("MEILI_TEST_FULL_SNAPS").unwrap_or_else(|_| "false".to_owned());
|
||||||
let store_whole_snapshot: bool = store_whole_snapshot.parse().unwrap();
|
let store_whole_snapshot: bool = store_whole_snapshot.parse().unwrap();
|
||||||
|
|
||||||
(settings, snap_name, store_whole_snapshot)
|
(settings, snap_name, store_whole_snapshot)
|
||||||
|
Loading…
Reference in New Issue
Block a user