From 6ac1b0503c25fd23d86db0b877b906817ebb8d76 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sun, 19 Apr 2020 13:02:47 +0200 Subject: [PATCH] Fix pattern matching style in `pyo3-derive-backend` code --- pyo3-derive-backend/src/func.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyo3-derive-backend/src/func.rs b/pyo3-derive-backend/src/func.rs index fe47fb24..95539d84 100644 --- a/pyo3-derive-backend/src/func.rs +++ b/pyo3-derive-backend/src/func.rs @@ -130,11 +130,11 @@ pub(crate) fn impl_method_proto( let slf_name = syn::Ident::new(arg, Span::call_site()); 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 --> PyRef<'p, Self> - if let syn::Type::Path(path) = &mut slf_ty { - if let syn::PathArguments::AngleBracketed(args) = - &mut path.path.segments[0].arguments + if let syn::Type::Path(ref mut path) = slf_ty { + if let syn::PathArguments::AngleBracketed(ref mut args) = + path.path.segments[0].arguments { if let syn::GenericArgument::Lifetime(_) = args.args[0] { } else {