Skip to content

Commit 881cb0a

Browse files
committed
Fix build failure on minimum nightly
1 parent 7702395 commit 881cb0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pyo3-derive-backend/src/method.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,19 +459,19 @@ fn parse_attributes(
459459
new_attrs.push(attr.clone())
460460
}
461461
}
462-
syn::Meta::NameValue(nv) if allow_custom_name && nv.path.is_ident("name") => {
462+
syn::Meta::NameValue(ref nv) if allow_custom_name && nv.path.is_ident("name") => {
463463
if name_with_span.is_some() {
464464
return Err(syn::Error::new_spanned(
465-
nv.path,
465+
&nv.path,
466466
"name can not be specified multiple times",
467467
));
468468
}
469469

470-
match nv.lit {
470+
match &nv.lit {
471471
syn::Lit::Str(s) => name_with_span = Some((s.parse()?, nv.path.span())),
472472
_ => {
473473
return Err(syn::Error::new_spanned(
474-
nv.lit,
474+
&nv.lit,
475475
"Expected string literal for method name",
476476
))
477477
}

0 commit comments

Comments
 (0)