From 830f5b257ca1ccc038ac9d6cbf527ea246156ce7 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Tue, 6 Apr 2021 12:20:01 -0700 Subject: [PATCH] Fix new clippy lint clippy::wrong-self-convention This should be backwards-compatible in practice since `IdentifierType` is `Copy`. In theory it's not though, as someone _might_ be passing that function by name to something that requires that exact signature. --- src/bindgen/rename.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bindgen/rename.rs b/src/bindgen/rename.rs index c573ed79..3d48d0ad 100644 --- a/src/bindgen/rename.rs +++ b/src/bindgen/rename.rs @@ -16,8 +16,8 @@ pub enum IdentifierType<'a> { } impl<'a> IdentifierType<'a> { - fn to_str(&'a self) -> &'static str { - match *self { + fn to_str(self) -> &'static str { + match self { IdentifierType::StructMember => "m", IdentifierType::EnumVariant { .. } => "", IdentifierType::FunctionArg => "a",