diff options
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -364,11 +364,7 @@ impl App { pub fn open_connected_file(cfg: &BibiConfig, file: &OsStr) -> Result<()> { // Build command to execute pdf-reader. 'xdg-open' is Linux standard - let cmd = match &cfg.general.pdf_opener { - Some(c) => c, - None => &select_opener(), - }; - + let cmd = cfg.general.as_ref().unwrap().pdf_opener.as_ref().unwrap(); // If necessary, replace ~ with /home dir let file = PathBuf::from(file); @@ -388,11 +384,7 @@ pub fn open_connected_file(cfg: &BibiConfig, file: &OsStr) -> Result<()> { pub fn open_connected_link(cfg: &BibiConfig, link: &str) -> Result<()> { // Build command to execute pdf-reader. 'xdg-open' is Linux standard - let cmd = match &cfg.general.url_opener { - Some(c) => c, - None => &select_opener(), - }; - + let cmd = cfg.general.as_ref().unwrap().url_opener.as_ref().unwrap(); // Pass filepath as argument, pipe stdout and stderr to /dev/null // to keep the TUI clean (where is it piped on Windows???) let _ = Command::new(cmd) |
