From 2f4c5cac2679ebad54ada7bbcb57c60b5521d52d Mon Sep 17 00:00:00 2001 From: "Carpenter, Adam (CORP)" Date: Wed, 1 Dec 2021 13:40:47 -0500 Subject: fix: #2 --- angelsharkcli/src/main.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/angelsharkcli/src/main.rs b/angelsharkcli/src/main.rs index 9d1ac36..6c8ea37 100644 --- a/angelsharkcli/src/main.rs +++ b/angelsharkcli/src/main.rs @@ -1,4 +1,4 @@ -use anyhow::{anyhow, Context, Error, Result}; +use anyhow::{Context, Error, Result}; use clap::{App, Arg, ArgMatches, SubCommand}; use csv::{QuoteStyle, WriterBuilder}; use libangelshark::{Acm, AcmRunner, Message, ParallelIterator}; @@ -29,10 +29,7 @@ fn main() -> Result<()> { AcmRunner::new(acms, inputs) .manuals() .for_each(|(name, output)| match output { - Err(e) => eprintln!( - "{}", - anyhow!(e).context(format!("angelsharkcli: manual ({})", name)) - ), + Err(e) => eprintln!("angelsharkcli: manual ({}): {}", name, e), Ok(o) => println!("{}", o), }); } @@ -128,19 +125,12 @@ fn main() -> Result<()> { .run() .for_each(|(name, output)| match output { Err(e) => { - eprintln!( - "{}", - anyhow!(e).context(format!("angelsharkcli: runner ({})", name)) - ); + eprintln!("angelsharkcli: runner ({}): {}", name, e); } Ok(o) => { for msg in o { if let Some(e) = msg.error { - eprintln!( - "{}", - anyhow!(e) - .context(format!("angelsharkcli: ossi ({})", name)) - ); + eprintln!("angelsharkcli: ossi ({}): {}", name, e); } } } -- cgit v1.2.3