style: use Self to avoid unnecessary repetition (#3396)

This commit is contained in:
Theodore Bjernhed
2025-07-04 21:10:01 +00:00
committed by GitHub
parent b8d9a3e764
commit 0f255c3c4c
33 changed files with 137 additions and 138 deletions
+4 -4
View File
@@ -97,8 +97,8 @@ pub(crate) enum FunctionKind {
impl fmt::Display for FunctionKind {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
FunctionKind::Handler => f.write_str("handler"),
FunctionKind::Middleware => f.write_str("middleware"),
Self::Handler => f.write_str("handler"),
Self::Middleware => f.write_str("middleware"),
}
}
}
@@ -106,8 +106,8 @@ impl fmt::Display for FunctionKind {
impl FunctionKind {
fn name_uppercase_plural(&self) -> &'static str {
match self {
FunctionKind::Handler => "Handlers",
FunctionKind::Middleware => "Middleware",
Self::Handler => "Handlers",
Self::Middleware => "Middleware",
}
}
}