Use '&*' instead of 'as_ref()' for 'String' to '&str' ref.

This commit is contained in:
Sergio Benitez 2017-09-07 16:55:38 -07:00
parent bd08d50f59
commit b5c2187249
1 changed files with 1 additions and 1 deletions

View File

@ -344,7 +344,7 @@ impl Config {
/// ```
pub fn set_address<A: Into<String>>(&mut self, address: A) -> Result<()> {
let address = address.into();
if (address.as_ref(), 0u16).to_socket_addrs().is_err() {
if (&*address, 0u16).to_socket_addrs().is_err() {
return Err(self.bad_type("address", "string", "a valid hostname or IP"));
}