diff options
| author | Trim Bresilla | 2024-12-04 12:38:59 +0100 |
|---|---|---|
| committer | lukeflo | 2024-12-23 21:03:19 +0100 |
| commit | bcde4e631f28d4610738df65353cf9b319d4b98a (patch) | |
| tree | d654bd007a4275019055386f82d527697ae6b77d /src/bibiman.rs | |
| parent | 9c0ad228a34d842cf21e88f8d99e5c2b5f51e93c (diff) | |
| download | bibiman-bcde4e631f28d4610738df65353cf9b319d4b98a.tar.gz bibiman-bcde4e631f28d4610738df65353cf9b319d4b98a.zip | |
fix: hande better eyre's OK and std's OK
- Remove unnecessary aliasing of Result to AOk
- Simplify the import statement for Result from color_eyre
- Update error handling for the new entry resolution process
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 19eaf4b..232fd9e 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -22,7 +22,7 @@ use crate::tui::popup::{PopupArea, PopupKind}; use crate::tui::Tui; use crate::{bibiman::entries::EntryTable, bibiman::keywords::TagList}; use arboard::Clipboard; -use color_eyre::eyre::{Ok, Result}; +use color_eyre::eyre::Result; use doi2bib; use editor_command::EditorBuilder; use futures::executor::block_on; @@ -31,7 +31,7 @@ use std::fs; use std::fs::OpenOptions; use std::io::Write; use std::process::Command; -use std::result::Result::Ok as AOk; +use std::result::Result::Ok; use tui_input::Input; pub mod bibisetup; @@ -129,7 +129,7 @@ impl Bibiman { let new_entry_future = doi2bib.resolve_doi(new_entry_title); let new_entry = block_on(new_entry_future); - if let AOk(entry) = new_entry { + if let Ok(entry) = new_entry { // TODO: Add error handling for failed insert let formatted_content = Self::format_bibtex_entry(&entry, ""); |
