mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-31 23:41:42 +08:00
Panic if we encountered a wring KindWithContent type
This commit is contained in:
parent
f3f6bbf624
commit
b7ad050737
@ -136,15 +136,17 @@ impl IndexScheduler {
|
|||||||
let mut documents_counts = Vec::new();
|
let mut documents_counts = Vec::new();
|
||||||
let mut content_files = Vec::new();
|
let mut content_files = Vec::new();
|
||||||
for task in &tasks {
|
for task in &tasks {
|
||||||
if let KindWithContent::DocumentImport {
|
match task.kind {
|
||||||
|
KindWithContent::DocumentImport {
|
||||||
content_file,
|
content_file,
|
||||||
documents_count,
|
documents_count,
|
||||||
..
|
..
|
||||||
} = task.kind
|
} => {
|
||||||
{
|
|
||||||
documents_counts.push(documents_count);
|
documents_counts.push(documents_count);
|
||||||
content_files.push(content_file);
|
content_files.push(content_file);
|
||||||
}
|
}
|
||||||
|
_ => unreachable!(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(Some(Batch::IndexOperation(
|
Ok(Some(Batch::IndexOperation(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user