mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
add use_self clippy lint (#8325)
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user