implement default on DatabaseOptions

This commit is contained in:
qdequele 2020-05-07 15:40:44 +02:00
parent fe21a43364
commit 2e55457ecc
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
4 changed files with 25 additions and 35 deletions

View file

@ -15,16 +15,11 @@ pub struct Server {
data: Data,
}
const DB_OPTS: DatabaseOptions = DatabaseOptions {
main_map_size: 100 * 1024 * 1024 * 1024,
update_map_size: 100 * 1024 * 1024 * 1024,
};
impl Server {
pub fn with_uid(uid: &str) -> Server {
let tmp_dir = TempDir::new("meilisearch").unwrap();
let default_db_options = DB_OPTS;
let default_db_options = DatabaseOptions::default();
let opt = Opt {
db_path: tmp_dir.path().to_str().unwrap().to_string(),