mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +02:00
style: use Self to avoid unnecessary repetition (#3396)
This commit is contained in:
@@ -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",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user