clippy: Disallow lint `match_like_matches_macro`
This commit is contained in:
parent
ca732015fb
commit
33a8c09f78
|
|
@ -1,4 +1,3 @@
|
||||||
#![allow(clippy::match_like_matches_macro)]
|
|
||||||
#![allow(clippy::too_many_arguments)]
|
#![allow(clippy::too_many_arguments)]
|
||||||
#![allow(clippy::iter_nth_zero)]
|
#![allow(clippy::iter_nth_zero)]
|
||||||
#![warn(clippy::unwrap_used)]
|
#![warn(clippy::unwrap_used)]
|
||||||
|
|
|
||||||
|
|
@ -514,10 +514,7 @@ impl Address {
|
||||||
/// Returns `true` if the [`HostName`] is a Tor onion address.
|
/// Returns `true` if the [`HostName`] is a Tor onion address.
|
||||||
#[cfg(feature = "tor")]
|
#[cfg(feature = "tor")]
|
||||||
pub fn is_onion(&self) -> bool {
|
pub fn is_onion(&self) -> bool {
|
||||||
match self.0.host {
|
matches!(self.0.host, HostName::Tor(_))
|
||||||
HostName::Tor(_) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return the port number of the [`Address`].
|
/// Return the port number of the [`Address`].
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue