forked from extern/nushell
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:
parent
3ec0242960
commit
8d03cf5b02
@ -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)
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user