Merge pull request #68 from tnull/2022-09-05-dont-double-check-addr
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Mon, 5 Sep 2022 16:05:42 +0000 (16:05 +0000)
committerGitHub <noreply@github.com>
Mon, 5 Sep 2022 16:05:42 +0000 (16:05 +0000)
Remove redundant `is_none()` check

src/cli.rs

index 013209f9d070ab8a1a33d78331afd0546880e165..5863ed0144430dda1fbe18231b7cbe70b0a988b6 100644 (file)
@@ -762,7 +762,7 @@ pub(crate) fn parse_peer_info(
        let mut pubkey_and_addr = peer_pubkey_and_ip_addr.split("@");
        let pubkey = pubkey_and_addr.next();
        let peer_addr_str = pubkey_and_addr.next();
-       if peer_addr_str.is_none() || peer_addr_str.is_none() {
+       if peer_addr_str.is_none() {
                return Err(std::io::Error::new(
                        std::io::ErrorKind::Other,
                        "ERROR: incorrectly formatted peer info. Should be formatted as: `pubkey@host:port`",