remove useless wrap_err

This commit is contained in:
monosans
2025-05-28 16:41:52 +03:00
parent ad201a5301
commit 8ccc8f126a
+1 -3
View File
@@ -20,9 +20,7 @@ static IPV4_REGEX: LazyLock<fancy_regex::Regex> = LazyLock::new(|| {
});
pub fn parse_ipv4(s: &str) -> Option<String> {
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