From e87d3b50c9639a8d7fc2536a61d64ff8beba09cf Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 15 May 2021 20:57:10 +0100 Subject: [PATCH] otter: Further improve error printing Signed-off-by: Ian Jackson --- src/bin/otter.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 45480347..ab853d15 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -98,13 +98,12 @@ struct Subcommand ( ); inventory::collect!(Subcommand); -#[derive(Error,Debug,Clone)] +#[derive(Error,Debug,Clone,Display)] struct ArgumentParseError(String); -display_as_debug!(ArgumentParseError); impl From<&anyhow::Error> for ArgumentParseError { fn from(ae: &anyhow::Error) -> ArgumentParseError { - eprintln!("error during argument parsing/startup: {:?}\n", ae); + eprintln!("error during argument parsing/startup: {}\n", ae); exit(EXIT_USAGE); } } -- 2.30.2