fix(settings): use localization
This commit is contained in:
@@ -159,9 +159,7 @@ impl Notedeck {
|
||||
1024usize * 1024usize * 1024usize * 1024usize
|
||||
};
|
||||
|
||||
let mut settings_handler = SettingsHandler::new(&path);
|
||||
|
||||
settings_handler.load();
|
||||
let settings_handler = SettingsHandler::new(&path).load();
|
||||
|
||||
let config = Config::new().set_ingester_threads(2).set_mapsize(map_size);
|
||||
|
||||
|
||||
@@ -84,9 +84,9 @@ impl SettingsHandler {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn load(&mut self) {
|
||||
pub fn load(mut self) -> Self {
|
||||
if self.migrate_to_settings_file().is_ok() {
|
||||
return;
|
||||
return self;
|
||||
}
|
||||
|
||||
match self.directory.get_file(SETTINGS_FILE.to_string()) {
|
||||
@@ -107,6 +107,8 @@ impl SettingsHandler {
|
||||
self.current_settings = Some(Settings::default());
|
||||
}
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
pub fn save(&self) {
|
||||
|
||||
Reference in New Issue
Block a user