diff --git a/src/server_name.rs b/src/server_name.rs index 1baa3bf..1b08c1c 100644 --- a/src/server_name.rs +++ b/src/server_name.rs @@ -91,13 +91,10 @@ impl<'a> TryFrom<&'a str> for ServerName<'a> { fn try_from(s: &'a str) -> Result { match DnsName::try_from(s) { Ok(dns) => Ok(Self::DnsName(dns)), - #[cfg(feature = "std")] Err(InvalidDnsNameError) => match IpAddr::try_from(s) { Ok(ip) => Ok(Self::IpAddress(ip)), Err(_) => Err(InvalidDnsNameError), }, - #[cfg(not(feature = "std"))] - Err(InvalidDnsNameError) => Err(InvalidDnsNameError), } } }