chiark / gitweb /
otter: Further improve error printing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 19:57:10 +0000 (20:57 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 20:08:23 +0000 (21:08 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/otter.rs

index 4548034721fac0ab3bab1ddbb07b02e9b8456326..ab853d15e24b69166ffdb3c7e9ebb78fd892716c 100644 (file)
@@ -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);
   }
 }