diff options
author | Hristo Venev <hristo@venev.name> | 2019-09-30 14:53:19 +0300 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2019-09-30 15:34:34 +0300 |
commit | 5cd9be6edd6cfc6f492907709eb1cfda4a99923f (patch) | |
tree | 00959cb420a4ff534acb7809395b97c9ffabd136 /src/model.rs | |
parent | 785da58fc732931a9a45cf598e5876a337e24011 (diff) |
Show the exact reason a network is invalid.
Diffstat (limited to 'src/model.rs')
-rw-r--r-- | src/model.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<Self, NetParseError> { 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(), |