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:
parent
ccea33ecb4
commit
54dfcf89e4
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user