Upgrade dependencies (#4064)

This commit is contained in:
Micha Reiser 2023-04-22 19:04:01 +02:00 committed by GitHub
parent b7a57ce120
commit ba4f4f4672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 527 additions and 309 deletions

View file

@ -44,10 +44,13 @@ impl Parse for ArgValue {
let inner;
let _ = bracketed!(inner in input);
let values = inner.parse_terminated(|parser| {
let value: LitStr = parser.parse()?;
Ok(value)
})?;
let values = inner.parse_terminated(
|parser| {
let value: LitStr = parser.parse()?;
Ok(value)
},
Token![,],
)?;
ArgValue::List(values)
} else {
ArgValue::LitStr(input.parse()?)
@ -59,7 +62,7 @@ impl Parse for ArgValue {
impl Parse for FixtureConfiguration {
fn parse(input: ParseStream) -> syn::Result<Self> {
let args: Punctuated<_, Token![,]> = input.parse_terminated(Arg::parse)?;
let args: Punctuated<_, Token![,]> = input.parse_terminated(Arg::parse, Token![,])?;
let mut pattern = None;
let mut exclude = None;
@ -186,7 +189,9 @@ fn generate_fixtures(
configuration: &FixtureConfiguration,
) -> syn::Result<proc_macro2::TokenStream> {
// Remove the fixtures attribute
test_fn.attrs.retain(|attr| !attr.path.is_ident("fixtures"));
test_fn
.attrs
.retain(|attr| !attr.path().is_ident("fixtures"));
// Extract the name of the only argument of the test function.
let last_arg = test_fn.sig.inputs.last();