mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
commit
f5dbfb246c
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ pub fn impl_parse_args_unnamed(
|
||||||
data.unnamed.iter().map(|f| &f.ty),
|
data.unnamed.iter().map(|f| &f.ty),
|
||||||
data.unnamed.len(),
|
data.unnamed.len(),
|
||||||
);
|
);
|
||||||
let iter = 0..data.unnamed.len();
|
let iter = (0..data.unnamed.len()).map(syn::Index::from);
|
||||||
let mut initialization = quote! {};
|
let mut initialization = quote! {};
|
||||||
for i in iter {
|
for i in iter {
|
||||||
initialization.extend(quote! { arguments.#i, })
|
initialization.extend(quote! { arguments.#i, })
|
||||||
|
@ -54,7 +54,7 @@ pub fn impl_parse_args_named(
|
||||||
data.named.iter().map(|f| &f.ty),
|
data.named.iter().map(|f| &f.ty),
|
||||||
data.named.len(),
|
data.named.len(),
|
||||||
);
|
);
|
||||||
let i = 0..data.named.len();
|
let i = (0..data.named.len()).map(syn::Index::from);
|
||||||
let name = data.named.iter().map(|f| f.ident.as_ref().unwrap());
|
let name = data.named.iter().map(|f| f.ident.as_ref().unwrap());
|
||||||
let res = quote! {
|
let res = quote! {
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue