mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update to syn 2 where possible (#30387)
* Update to syn 2 where possible * Cleanups * Better no_trace comment Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
7caac9790d
commit
8b30d1a4b2
8 changed files with 57 additions and 54 deletions
|
@ -56,7 +56,8 @@ pub struct RootTypeDef {
|
|||
|
||||
impl Parse for MacroInput {
|
||||
fn parse(input: ParseStream<'_>) -> Result<Self> {
|
||||
let fields: Punctuated<MacroArg, Token![, ]> = input.parse_terminated(MacroArg::parse)?;
|
||||
let fields: Punctuated<MacroArg, Token![, ]> =
|
||||
Punctuated::parse_terminated_with(input, MacroArg::parse)?;
|
||||
let mut gen_accessors = None;
|
||||
let mut type_def = None;
|
||||
let mut accessor_type = None;
|
||||
|
@ -134,7 +135,7 @@ impl Parse for NewTypeDef {
|
|||
#[allow(clippy::eval_order_dependence)]
|
||||
Ok(NewTypeDef {
|
||||
_braces: braced!(content in input),
|
||||
fields: content.parse_terminated(Field::parse)?,
|
||||
fields: Punctuated::parse_terminated_with(&content, Field::parse)?,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue