mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
Merge #1966
1966: fix: Corrected assertion arguments r=pksunkara a=stedingan Co-authored-by: Andreas Steding <steding.andreas@gmail.com>
This commit is contained in:
commit
0b487de9ce
2 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@ impl<T: ToTokens> ToTokens for Sp<T> {
|
|||
// this is the simplest way out of correct ones to change span on
|
||||
// arbitrary token tree I could come up with
|
||||
let tt = self.val.to_token_stream().into_iter().map(|mut tt| {
|
||||
tt.set_span(self.span.clone());
|
||||
tt.set_span(self.span);
|
||||
tt
|
||||
});
|
||||
|
||||
|
|
|
@ -1577,7 +1577,7 @@ impl<'b> App<'b> {
|
|||
|
||||
// Name conflicts
|
||||
assert!(
|
||||
self.two_args_of(|x| x.name == arg.name).is_none(),
|
||||
self.two_args_of(|x| x.id == arg.id).is_none(),
|
||||
"Argument names must be unique, but '{}' is in use by more than one argument or group",
|
||||
arg.name,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue