Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
clippy: Disallow `match_like_matches_macro`
Lorenz Leutgeb committed 24 days ago
commit 5698e7803b26df0dbb56ec576679b57eb6d98ad7
parent 9fa201eb214e4d0c4c4fd05af7bc2ccf556d6e4b
2 files changed +1 -5
modified crates/radicle/src/lib.rs
@@ -1,4 +1,3 @@
-
#![allow(clippy::match_like_matches_macro)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::iter_nth_zero)]
#![warn(clippy::unwrap_used)]
modified crates/radicle/src/node.rs
@@ -514,10 +514,7 @@ impl Address {
    /// Returns `true` if the [`HostName`] is a Tor onion address.
    #[cfg(feature = "tor")]
    pub fn is_onion(&self) -> bool {
-
        match self.0.host {
-
            HostName::Tor(_) => true,
-
            _ => false,
-
        }
+
        matches!(self.0.host, HostName::Tor(_))
    }

    /// Return the port number of the [`Address`].