diff options
Diffstat (limited to 'vendor/syn/src/pat.rs')
-rw-r--r-- | vendor/syn/src/pat.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vendor/syn/src/pat.rs b/vendor/syn/src/pat.rs index 5833eeb33..2e6376b2f 100644 --- a/vendor/syn/src/pat.rs +++ b/vendor/syn/src/pat.rs @@ -543,17 +543,17 @@ pub(crate) mod parsing { Member::Unnamed(_) => unreachable!(), }; - let mut pat = Pat::Ident(PatIdent { - attrs: Vec::new(), - by_ref, - mutability, - ident: ident.clone(), - subpat: None, - }); - - if boxed.is_some() { - pat = Pat::Verbatim(verbatim::between(begin, input)); - } + let pat = if boxed.is_some() { + Pat::Verbatim(verbatim::between(begin, input)) + } else { + Pat::Ident(PatIdent { + attrs: Vec::new(), + by_ref, + mutability, + ident: ident.clone(), + subpat: None, + }) + }; Ok(FieldPat { attrs: Vec::new(), |