summaryrefslogtreecommitdiffstats
path: root/vendor/syn/src/item.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/syn/src/item.rs14
1 files changed, 3 insertions, 11 deletions
diff --git a/vendor/syn/src/item.rs b/vendor/syn/src/item.rs
index 1ce970ee2..a1ef7ab43 100644
--- a/vendor/syn/src/item.rs
+++ b/vendor/syn/src/item.rs
@@ -2765,7 +2765,6 @@ mod printing {
use super::*;
use crate::attr::FilterAttrs;
use crate::print::TokensOrDefault;
- use crate::punctuated::Pair;
use proc_macro2::TokenStream;
use quote::{ToTokens, TokenStreamExt};
@@ -3283,16 +3282,9 @@ mod printing {
self.generics.to_tokens(tokens);
self.paren_token.surround(tokens, |tokens| {
let mut last_is_variadic = false;
- for input in self.inputs.pairs() {
- match input {
- Pair::Punctuated(input, comma) => {
- maybe_variadic_to_tokens(input, tokens);
- comma.to_tokens(tokens);
- }
- Pair::End(input) => {
- last_is_variadic = maybe_variadic_to_tokens(input, tokens);
- }
- }
+ for pair in self.inputs.pairs() {
+ last_is_variadic = maybe_variadic_to_tokens(pair.value(), tokens);
+ pair.punct().to_tokens(tokens);
}
if self.variadic.is_some() && !last_is_variadic {
if !self.inputs.empty_or_trailing() {