mirror of
https://github.com/danbulant/nushell
synced 2026-05-24 12:35:59 +00:00
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
1 changed files with 4 additions and 1 deletions
|
|
@ -274,7 +274,10 @@ impl Signature {
|
||||||
short: Option<char>,
|
short: Option<char>,
|
||||||
) -> Signature {
|
) -> Signature {
|
||||||
let s = short.and_then(|c| {
|
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)
|
Some(c)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue