imag/imag-diary/src/util.rs

9 lines
241 B
Rust

use libimagrt::runtime::Runtime;
pub fn get_diary_name(rt: &Runtime) -> Option<String> {
use libimagdiary::config::get_default_diary_name;
get_default_diary_name(rt)
.or(rt.cli().value_of("diaryname").map(String::from))
}