Handle socket address parsing errors (#8545)

Unpack errors and check for io::ErrorKind::InvalidInput and return our own AddressParse error. Remove the foreign link to std::net::AddrParseError and add an `impl From` for that error. Test parsing properly.
This commit is contained in:
David
2018-05-09 15:58:02 +02:00
committed by GitHub
parent 25536c5ffb
commit cb7ad2366d
5 changed files with 63 additions and 10 deletions

View File

@@ -95,6 +95,8 @@ extern crate serde_derive;
#[cfg(test)]
extern crate tempdir;
#[cfg(test)] #[macro_use]
extern crate assert_matches;
mod host;
mod connection;