Clean up the delete_persisted_task_data function

This commit is contained in:
Kerollmops 2022-10-19 11:33:05 +02:00 committed by Clément Renault
parent d21651c968
commit 6460b78e08
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -699,21 +699,9 @@ impl IndexScheduler {
}
pub(crate) fn delete_persisted_task_data(&self, task: &Task) -> Result<()> {
match &task.kind {
KindWithContent::DocumentImport { content_file, .. } => {
self.delete_update_file(*content_file)
}
KindWithContent::DocumentDeletion { .. }
| KindWithContent::DocumentClear { .. }
| KindWithContent::Settings { .. }
| KindWithContent::IndexDeletion { .. }
| KindWithContent::IndexCreation { .. }
| KindWithContent::IndexUpdate { .. }
| KindWithContent::IndexSwap { .. }
| KindWithContent::TaskCancelation { .. }
| KindWithContent::TaskDeletion { .. }
| KindWithContent::DumpExport { .. }
| KindWithContent::Snapshot => Ok(()),
match task.content_uuid() {
Some(content_file) => self.delete_update_file(*content_file),
None => Ok(()),
}
}
}