Fix clippy and fmt issues

This commit is contained in:
Francesco 2024-02-14 13:29:57 +01:00
parent 8a7f8916c0
commit 5d82155060
3 changed files with 3 additions and 9 deletions

View File

@ -32,7 +32,7 @@ fn setup_index() -> Index {
let mut options = EnvOpenOptions::new(); let mut options = EnvOpenOptions::new();
options.map_size(100 * 1024 * 1024 * 1024); // 100 GB options.map_size(100 * 1024 * 1024 * 1024); // 100 GB
options.max_readers(10); options.max_readers(10);
Index::new(options, path).unwrap() Index::new(None, options, path).unwrap()
} }
fn setup_settings<'t>( fn setup_settings<'t>(

View File

@ -66,7 +66,7 @@ pub fn base_setup(conf: &Conf) -> Index {
let mut options = EnvOpenOptions::new(); let mut options = EnvOpenOptions::new();
options.map_size(100 * 1024 * 1024 * 1024); // 100 GB options.map_size(100 * 1024 * 1024 * 1024); // 100 GB
options.max_readers(10); options.max_readers(10);
let index = Index::new(options, conf.database_name).unwrap(); let index = Index::new(None, options, conf.database_name).unwrap();
let config = IndexerConfig::default(); let config = IndexerConfig::default();
let mut wtxn = index.write_txn().unwrap(); let mut wtxn = index.write_txn().unwrap();

View File

@ -311,13 +311,7 @@ fn create_or_open_index(
} }
if let Some((created, updated)) = date { if let Some((created, updated)) = date {
Ok(Index::new_with_creation_dates( Ok(Index::new_with_creation_dates(name, options, path, created, updated)?)
name,
options,
path,
created,
updated,
)?)
} else { } else {
Ok(Index::new(name, options, path)?) Ok(Index::new(name, options, path)?)
} }