get rids of the let/else syntax

This commit is contained in:
Tamo 2023-02-14 17:45:46 +01:00
parent 746b31c1ce
commit 29d14bed90
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
2 changed files with 30 additions and 10 deletions

View file

@ -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 {