We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7702395 commit 881cb0aCopy full SHA for 881cb0a
pyo3-derive-backend/src/method.rs
@@ -459,19 +459,19 @@ fn parse_attributes(
459
new_attrs.push(attr.clone())
460
}
461
462
- syn::Meta::NameValue(nv) if allow_custom_name && nv.path.is_ident("name") => {
+ syn::Meta::NameValue(ref nv) if allow_custom_name && nv.path.is_ident("name") => {
463
if name_with_span.is_some() {
464
return Err(syn::Error::new_spanned(
465
- nv.path,
+ &nv.path,
466
"name can not be specified multiple times",
467
));
468
469
470
- match nv.lit {
+ match &nv.lit {
471
syn::Lit::Str(s) => name_with_span = Some((s.parse()?, nv.path.span())),
472
_ => {
473
474
- nv.lit,
+ &nv.lit,
475
"Expected string literal for method name",
476
))
477
0 commit comments