use FromStr;
use crateParseError;
use crateInvalidPort;
/// Parses the port from the `address` string.
///
/// Returns `(address_without_last_colon, port)`.
///
/// # Examples
/// localhost:80 -> `Ok("localhost", 80)`
/// :80 -> `Ok("", 80)`
/// :8x -> `Err(InvalidPort)`
/// 80 -> `Err(InvalidPort)`
pub