Fix pattern matching style in `pyo3-derive-backend` code

This commit is contained in:
Martin Larralde 2020-04-19 13:02:47 +02:00
parent 378a6a484c
commit 6ac1b0503c
1 changed files with 4 additions and 4 deletions

View File

@ -130,11 +130,11 @@ pub(crate) fn impl_method_proto(
let slf_name = syn::Ident::new(arg, Span::call_site()); let slf_name = syn::Ident::new(arg, Span::call_site());
let mut slf_ty = get_arg_ty(sig, 0); let mut slf_ty = get_arg_ty(sig, 0);
// update the type if not lifetime was given: // update the type if no lifetime was given:
// PyRef<Self> --> PyRef<'p, Self> // PyRef<Self> --> PyRef<'p, Self>
if let syn::Type::Path(path) = &mut slf_ty { if let syn::Type::Path(ref mut path) = slf_ty {
if let syn::PathArguments::AngleBracketed(args) = if let syn::PathArguments::AngleBracketed(ref mut args) =
&mut path.path.segments[0].arguments path.path.segments[0].arguments
{ {
if let syn::GenericArgument::Lifetime(_) = args.args[0] { if let syn::GenericArgument::Lifetime(_) = args.args[0] {
} else { } else {