diff options
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/bib.rs | 1 | ||||
| -rw-r--r-- | src/backend/cliargs.rs | 23 |
2 files changed, 1 insertions, 23 deletions
diff --git a/src/backend/bib.rs b/src/backend/bib.rs index 3e0e844..bfc959d 100644 --- a/src/backend/bib.rs +++ b/src/backend/bib.rs @@ -17,7 +17,6 @@ use biblatex::{self, Bibliography}; use biblatex::{ChunksExt, Type}; -use color_eyre::eyre::ErrReport; use std::{fs, path::PathBuf}; // Set necessary fields diff --git a/src/backend/cliargs.rs b/src/backend/cliargs.rs index 31d37f0..d3a4652 100644 --- a/src/backend/cliargs.rs +++ b/src/backend/cliargs.rs @@ -15,7 +15,6 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. ///// -use core::panic; use std::path::PathBuf; use sarge::prelude::*; @@ -45,7 +44,7 @@ impl CLIArgs { PathBuf::from(&pos_args[1]) // pos_args[1].to_string() } else { - panic!("No path to bibfile provided as argument") + PathBuf::new() }; Self { helparg: cli_args.help, @@ -55,26 +54,6 @@ impl CLIArgs { } } -// Struct for positional arguments -// TODO: Can surely be improved!! -// pub struct PosArgs { -// pub bibfilearg: PathBuf, -// } - -// impl PosArgs { -// pub fn parse_pos_args() -> Self { -// let (_, pos_args) = ArgumentsCLI::parse().expect("Could not parse positional arguments"); -// Self { -// bibfilearg: if pos_args.len() > 1 { -// PathBuf::from(&pos_args[1]) -// // pos_args[1].to_string() -// } else { -// panic!("No path to bibfile provided as argument") -// }, // bibfilearg: pos_args[1].to_string(), -// } -// } -// } - pub fn help_func() -> String { let help = format!( "\ |
