diff --git a/src/parsers.rs b/src/parsers.rs index 37d2ae9..ade9160 100644 --- a/src/parsers.rs +++ b/src/parsers.rs @@ -20,9 +20,7 @@ static IPV4_REGEX: LazyLock = LazyLock::new(|| { }); pub fn parse_ipv4(s: &str) -> Option { - if let Ok(Some(captures)) = - IPV4_REGEX.captures(s).wrap_err("failed to match regex capture groups") - { + if let Ok(Some(captures)) = IPV4_REGEX.captures(s) { captures.name("host").map(|capture| capture.as_str().to_owned()) } else { None