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.
This commit is contained in:
Jon Gjengset 2021-04-06 12:20:01 -07:00 committed by Emilio Cobos Álvarez
parent ccea33ecb4
commit 54dfcf89e4

View File

@ -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",