mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
get rids of the let/else syntax
This commit is contained in:
parent
746b31c1ce
commit
29d14bed90
2 changed files with 30 additions and 10 deletions
|
@ -440,10 +440,16 @@ impl IndexScheduler {
|
|||
deleted_documents,
|
||||
} => {
|
||||
assert_eq!(kind.as_kind(), Kind::DocumentDeletion);
|
||||
let KindWithContent::DocumentDeletion {
|
||||
ref index_uid,
|
||||
ref documents_ids,
|
||||
} = kind else { unreachable!() };
|
||||
let (index_uid, documents_ids) =
|
||||
if let KindWithContent::DocumentDeletion {
|
||||
ref index_uid,
|
||||
ref documents_ids,
|
||||
} = kind
|
||||
{
|
||||
(index_uid, documents_ids)
|
||||
} else {
|
||||
unreachable!()
|
||||
};
|
||||
assert_eq!(&task_index_uid.unwrap(), index_uid);
|
||||
|
||||
match status {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue