diff --git a/infos/src/main.rs b/infos/src/main.rs index 1ebf39969..c627edad8 100644 --- a/infos/src/main.rs +++ b/infos/src/main.rs @@ -179,18 +179,9 @@ enum Command { PatchToNewExternalIds, } -fn main() -> Result<(), ()> { +fn main() -> anyhow::Result<()> { let opt = Opt::from_args(); - match run(opt) { - Ok(()) => Ok(()), - Err(e) => { - eprintln!("{}", e); - Err(()) - }, - } -} -fn run(opt: Opt) -> anyhow::Result<()> { stderrlog::new() .verbosity(opt.verbose) .show_level(false) diff --git a/search/src/main.rs b/search/src/main.rs index 7e9443e5f..f7f95b730 100644 --- a/search/src/main.rs +++ b/search/src/main.rs @@ -39,18 +39,9 @@ pub struct Opt { print_facet_distribution: bool, } -fn main() -> Result<(), ()> { +fn main() -> anyhow::Result<()> { let opt = Opt::from_args(); - match run(opt) { - Ok(()) => Ok(()), - Err(e) => { - eprintln!("{}", e); - Err(()) - }, - } -} -fn run(opt: Opt) -> anyhow::Result<()> { stderrlog::new() .verbosity(opt.verbose) .show_level(false)