From bed73446ab83b69b1eb7d73f0219beb91f12e237 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sun, 19 Oct 2025 20:16:47 +0200 Subject: update all deps to latest version --- src/bibiman.rs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/bibiman.rs') diff --git a/src/bibiman.rs b/src/bibiman.rs index 392ae95..41f549a 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -511,13 +511,13 @@ impl Bibiman { tui.exit()?; // Use VISUAL or EDITOR. Set "vi" as last fallback let mut cmd: Command = EditorBuilder::new() - .source(cfg.general.editor.as_ref()) + .string(cfg.general.editor.as_ref()) .environment() - .source(Some("vi")) - .build() - .unwrap(); + .string(Some("vi")) + .build()? + .open_at(filepath, line_count as u32, 0); // Prepare arguments to open file at specific line - let status = cmd.arg(format!("+{}", line_count)).arg(filepath).status()?; + let status = cmd.status()?; if !status.success() { eprintln!("Spawning editor failed with status {}", status); } @@ -577,13 +577,13 @@ impl Bibiman { tui.exit()?; // Use VISUAL or EDITOR. Set "vi" as last fallback let mut note_cmd: Command = EditorBuilder::new() - .source(cfg.general.editor.clone()) + .string(cfg.general.editor.clone()) .environment() - .source(Some("vi")) - .build() - .unwrap(); + .string(Some("vi")) + .build()? + .open(file); // Prepare arguments to open file at specific line - let status = note_cmd.arg(file).status()?; + let status = note_cmd.status()?; if !status.success() { eprintln!("Spawning editor failed with status {}", status); } @@ -625,13 +625,14 @@ impl Bibiman { // Send GET request to doi resolver let doi_entry = ureq::get(&doi_string) - .set("Accept", "application/x-bibtex") + .header("Accept", "application/x-bibtex") .call(); if let Ok(entry) = doi_entry { // Save generated bibtex entry in structs field let entry = entry - .into_string() + .into_body() + .read_to_string() .expect("Couldn't parse fetched entry into string"); self.popup_area.popup_sel_item = entry; self.popup_area.popup_kind = Some(PopupKind::AppendToFile); -- cgit v1.2.3