From b5c218724948d20bd1e0107044c342b2eabf4617 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Thu, 7 Sep 2017 16:55:38 -0700 Subject: [PATCH] Use '&*' instead of 'as_ref()' for 'String' to '&str' ref. --- lib/src/config/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/config/config.rs b/lib/src/config/config.rs index fd1544e8..fa06363a 100644 --- a/lib/src/config/config.rs +++ b/lib/src/config/config.rs @@ -344,7 +344,7 @@ impl Config { /// ``` pub fn set_address>(&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")); }