From 5cd9be6edd6cfc6f492907709eb1cfda4a99923f Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Mon, 30 Sep 2019 14:53:19 +0300 Subject: Show the exact reason a network is invalid. --- src/model.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/model.rs') diff --git a/src/model.rs b/src/model.rs index 8ae4f6a..f0e1a7a 100644 --- a/src/model.rs +++ b/src/model.rs @@ -127,7 +127,7 @@ impl FromStr for Endpoint { fn from_str(s: &str) -> Result { use std::net; net::SocketAddr::from_str(s) - .map_err(|_| NetParseError) + .map_err(|_| NetParseError::BadAddress) .map(|v| Self { address: match v.ip() { net::IpAddr::V4(a) => a.to_ipv6_mapped(), -- cgit