diff --git a/swap/src/cli/command.rs b/swap/src/cli/command.rs index 4b3f672b..815288a3 100644 --- a/swap/src/cli/command.rs +++ b/swap/src/cli/command.rs @@ -55,12 +55,7 @@ where Ok(matches) => RawArguments::from_clap(&matches), Err(clap::Error { message, - kind: clap::ErrorKind::HelpDisplayed, - .. - }) - | Err(clap::Error { - message, - kind: clap::ErrorKind::VersionDisplayed, + kind: clap::ErrorKind::HelpDisplayed | clap::ErrorKind::VersionDisplayed, .. }) => return Ok(ParseResult::PrintAndExitZero { message }), Err(e) => anyhow::bail!(e), diff --git a/swap/src/network/tor_transport.rs b/swap/src/network/tor_transport.rs index d6b82e5b..0136ba73 100644 --- a/swap/src/network/tor_transport.rs +++ b/swap/src/network/tor_transport.rs @@ -77,14 +77,12 @@ fn fmt_as_address_string(multi: Multiaddr) -> Result format!("{}", addr), Some(Protocol::Ip6(addr)) => format!("{}", addr), - Some(Protocol::Dns(addr)) => format!("{}", addr), - Some(Protocol::Dns4(addr)) => format!("{}", addr), + Some(Protocol::Dns(addr) | Protocol::Dns4(addr)) => format!("{}", addr), _ => return Err(TransportError::MultiaddrNotSupported(multi)), }; let port = match protocols.next() { - Some(Protocol::Tcp(port)) => port, - Some(Protocol::Udp(port)) => port, + Some(Protocol::Tcp(port) | Protocol::Udp(port)) => port, _ => return Err(TransportError::MultiaddrNotSupported(multi)), };