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
This commit is contained in:
Darren Schroeder
2020-07-11 16:49:44 -05:00
committed by GitHub
parent 3ec0242960
commit 8d03cf5b02

View File

@ -274,7 +274,10 @@ impl Signature {
short: Option<char>,
) -> 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)
});