1966: fix: Corrected assertion arguments r=pksunkara a=stedingan



Co-authored-by: Andreas Steding <steding.andreas@gmail.com>
This commit is contained in:
bors[bot] 2020-06-08 22:40:24 +00:00 committed by GitHub
commit 0b487de9ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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
});

View file

@ -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,
);