Fix multiple bugs

This commit is contained in:
Kerollmops
2020-06-11 11:55:03 +02:00
parent 4e86ecf807
commit 0a83a86e65
6 changed files with 63 additions and 50 deletions

View File

@ -93,9 +93,9 @@ async fn main() -> anyhow::Result<()> {
body.extend_from_slice(headers);
for id in documents_ids {
if let Some(content) = index.documents.get(&rtxn, &BEU32::new(id)).unwrap() {
body.extend_from_slice(&content);
}
let content = index.documents.get(&rtxn, &BEU32::new(id)).unwrap();
let content = content.expect(&format!("could not find document {}", id));
body.extend_from_slice(&content);
}
}