add use_self clippy lint (#8325)

This commit is contained in:
Thomas Coratger
2024-05-29 15:14:14 +02:00
committed by GitHub
parent 0cb5358fef
commit 19c529e8df
200 changed files with 1817 additions and 1954 deletions

View File

@ -135,11 +135,11 @@ impl<K: EnrKeyUnambiguous> Query<K> {
/// Advances the query
fn poll(&mut self, cx: &mut Context<'_>) -> Poll<QueryOutcome<K>> {
match self {
Query::Root(ref mut query) => {
Self::Root(ref mut query) => {
let outcome = ready!(query.as_mut().poll(cx));
Poll::Ready(QueryOutcome::Root(outcome))
}
Query::Entry(ref mut query) => {
Self::Entry(ref mut query) => {
let outcome = ready!(query.as_mut().poll(cx));
Poll::Ready(QueryOutcome::Entry(outcome))
}

View File

@ -157,6 +157,6 @@ pub(crate) enum ResolveKind {
impl ResolveKind {
pub(crate) fn is_link(&self) -> bool {
matches!(self, ResolveKind::Link)
matches!(self, Self::Link)
}
}

View File

@ -58,10 +58,10 @@ pub enum DnsEntry<K: EnrKeyUnambiguous> {
impl<K: EnrKeyUnambiguous> fmt::Display for DnsEntry<K> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
DnsEntry::Root(entry) => entry.fmt(f),
DnsEntry::Link(entry) => entry.fmt(f),
DnsEntry::Branch(entry) => entry.fmt(f),
DnsEntry::Node(entry) => entry.fmt(f),
Self::Root(entry) => entry.fmt(f),
Self::Link(entry) => entry.fmt(f),
Self::Branch(entry) => entry.fmt(f),
Self::Node(entry) => entry.fmt(f),
}
}
}