diff options
Diffstat (limited to 'lib/domain/libimagdiary/src/config.rs')
-rw-r--r-- | lib/domain/libimagdiary/src/config.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/domain/libimagdiary/src/config.rs b/lib/domain/libimagdiary/src/config.rs index c2a6a980..e306e5d7 100644 --- a/lib/domain/libimagdiary/src/config.rs +++ b/lib/domain/libimagdiary/src/config.rs @@ -34,10 +34,8 @@ pub fn get_default_diary_name(rt: &Runtime) -> Option<String> { } pub fn get_diary_config_section<'a>(rt: &'a Runtime) -> Option<&'a Value> { - rt.config() - .map(|config| config.config()) - .and_then(|config| match config.read(&String::from("diary")) { - Ok(x) => x, - Err(_) => None, - }) + rt.config().and_then(|config| match config.read(&String::from("diary")) { + Ok(x) => x, + Err(_) => None, + }) } |