pub(super) fn generate_tuple<T: ToTokens, I: IntoIterator<Item = T>>(elements: I) -> TokenStream {
    let mut elements = elements.into_iter().peekable();

    //If this is empty, the tuple expression is `()`, but if it's not then there should be a
    //trailing comma at the end
    if elements.peek().is_none() {
        quote! { () }
    } else {
        quote! { ( #(#elements),*, )}
    }
}
/// Given an iterable sequence of `TokenStream`s, produces a new `TokenStream` which will be a
/// tuple expression with each element of the tuple corresponding to a stream in the iterator.
///
/// This handles the special-case syntax whereby an empty iterator is `()` but all others have a
/// trailing comma
Given an iterable sequence of `TokenStream`s, produces a new `TokenStream` which will be a
tuple expression with each element of the tuple corresponding to a stream in the iterator.

This handles the special-case syntax whereby an empty iterator is `()` but all others have a
trailing comma
Given an iterable sequence of ` TokenStream ` s produces a new ` TokenStream ` which will be a tuple expression with each element of the tuple corresponding to a stream in the iterator . This handles the special - case syntax whereby an empty iterator is ` () ` but all others have a trailing comma
pub(super) fn generate_tuple<T: ToTokens, I: IntoIterator<Item = T>>(elements: I) -> TokenStream {
    let mut elements = elements.into_iter().peekable();
    //If this is empty, the tuple expression is `()`, but if it's not then there should be a
    //trailing comma at the end
    if elements.peek().is_none() {
        quote! { () }
    } else {
        quote! { ( #(#elements),*, )}
    }
}
pub ( super ) fn generate_tuple < T : ToTokens , I : IntoIterator < Item = T > > ( elements : I ) -> TokenStream { let mut elements = elements . into_iter ( ) . peekable ( ) ; //If this is empty, the tuple expression is `()`, but if it's not then there should be a //trailing comma at the end if elements . peek ( ) . is_none ( ) { quote ! { ( ) } } else { quote ! { ( ( elements ) ) } } }
Given an iterable sequence of `TokenStream`s, produces a new `TokenStream` which will be a
tuple expression with each element of the tuple corresponding to a stream in the iterator.
Given an iterable sequence of ` TokenStream ` s produces a new ` TokenStream ` which will be a tuple expression with each element of the tuple corresponding to a stream in the iterator .
elements
I
elements
I