From 8d03cf5b02fac8d1c3feae7032727f3a23d2f84b Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Sat, 11 Jul 2020 16:49:44 -0500 Subject: [PATCH] added more verbose message to assert (#2157) * added more verbose message to assert having a -h short is bad for any command since it's already used by --help. * updated for fmt --- crates/nu-protocol/src/signature.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/nu-protocol/src/signature.rs b/crates/nu-protocol/src/signature.rs index 7efe43583..12557c85a 100644 --- a/crates/nu-protocol/src/signature.rs +++ b/crates/nu-protocol/src/signature.rs @@ -274,7 +274,10 @@ impl Signature { short: Option, ) -> Signature { let s = short.and_then(|c| { - debug_assert!(!self.get_shorts().contains(&c)); + debug_assert!( + !self.get_shorts().contains(&c), + "There may be duplicate short flags, such as -h" + ); Some(c) });