mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
Panic if we encountered a wring KindWithContent type
This commit is contained in:
parent
36e5efde0d
commit
6b3b05fb73
@ -136,14 +136,16 @@ impl IndexScheduler {
|
||||
let mut documents_counts = Vec::new();
|
||||
let mut content_files = Vec::new();
|
||||
for task in &tasks {
|
||||
if let KindWithContent::DocumentImport {
|
||||
content_file,
|
||||
documents_count,
|
||||
..
|
||||
} = task.kind
|
||||
{
|
||||
documents_counts.push(documents_count);
|
||||
content_files.push(content_file);
|
||||
match task.kind {
|
||||
KindWithContent::DocumentImport {
|
||||
content_file,
|
||||
documents_count,
|
||||
..
|
||||
} => {
|
||||
documents_counts.push(documents_count);
|
||||
content_files.push(content_file);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user