diff options
| author | lukeflo | 2025-02-22 00:48:41 +0100 |
|---|---|---|
| committer | lukeflo | 2025-02-22 00:48:41 +0100 |
| commit | 63d4410fdfe7712faec287aee2f5c0ca288dc996 (patch) | |
| tree | cdc1c3a2fa012c9c194766c256572129ae069a92 /src/bibiman.rs | |
| parent | 9cfed78e434a165d4cc01a869dfa7066b8b29819 (diff) | |
| download | bibiman-63d4410fdfe7712faec287aee2f5c0ca288dc996.tar.gz bibiman-63d4410fdfe7712faec287aee2f5c0ca288dc996.zip | |
replace Config crate with Figment -> better merging of default and config values
Diffstat (limited to 'src/bibiman.rs')
| -rw-r--r-- | src/bibiman.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bibiman.rs b/src/bibiman.rs index b8ef2c6..e36d268 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -85,8 +85,8 @@ impl Bibiman { // Constructs a new instance of [`App`]. pub fn new(args: &mut CLIArgs, cfg: &mut BibiConfig) -> Result<Self> { let mut main_bibfiles: Vec<PathBuf> = args.pos_args.clone(); - if cfg.general.as_ref().unwrap().bibfiles.is_some() { - main_bibfiles.append(cfg.general.as_mut().unwrap().bibfiles.as_mut().unwrap()) + if cfg.general.bibfiles.is_some() { + main_bibfiles.append(cfg.general.bibfiles.as_mut().unwrap()) }; let main_bibfiles = cliargs::parse_files(main_bibfiles); let main_biblio = BibiSetup::new(&main_bibfiles); @@ -381,7 +381,7 @@ impl Bibiman { tui.exit()?; // Use VISUAL or EDITOR. Set "vi" as last fallback let mut cmd: Command = EditorBuilder::new() - .source(cfg.general.as_ref().unwrap().editor.clone()) + .source(cfg.general.editor.as_ref()) .environment() .source(Some("vi")) .build() |
