mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-19 09:35:51 +08:00
Panic if we encountered a wring KindWithContent type
This commit is contained in:
parent
f3f6bbf624
commit
b7ad050737
@ -136,14 +136,16 @@ 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 {
|
||||||
content_file,
|
KindWithContent::DocumentImport {
|
||||||
documents_count,
|
content_file,
|
||||||
..
|
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!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user