remove anyhow refs & implement missing errors

This commit is contained in:
marin postma
2021-06-14 21:26:35 +02:00
parent c1b6f0e833
commit 58f9974be4
40 changed files with 707 additions and 668 deletions

View File

@ -1,7 +1,6 @@
use std::fs::File;
use crate::index::Index;
use anyhow::Result;
use grenad::CompressionType;
use milli::update::UpdateBuilder;
use rayon::ThreadPool;
@ -22,7 +21,7 @@ pub struct UpdateHandler {
}
impl UpdateHandler {
pub fn new(opt: &IndexerOpts) -> anyhow::Result<Self> {
pub fn new(opt: &IndexerOpts) -> std::result::Result<Self, Box<dyn std::error::Error>> {
let thread_pool = rayon::ThreadPoolBuilder::new()
.num_threads(opt.indexing_jobs.unwrap_or(0))
.build()?;