diff options
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server.rs b/src/server.rs index f2150a0..a612b13 100644 --- a/src/server.rs +++ b/src/server.rs @@ -68,7 +68,7 @@ where /// Given a host and port, creates a string of the form "host:port" or /// "[host]:port", depending on whether the host is an IPv6 literal. fn join_host_port(host: &str, port: u16) -> String { - if host.starts_with("unix:") | host.starts_with("unix-abstract:") { + if host.starts_with("unix:") { format!("{}\0", host) } else if let Ok(ip) = host.parse::<IpAddr>() { format!("{}\0", SocketAddr::new(ip, port)) @@ -88,8 +88,6 @@ mod imp { pub host: String, pub port: u16, cred: Option<ServerCredentials>, - // Double allocation to get around C call. - #[allow(clippy::redundant_allocation)] _fetcher: Option<Box<Box<dyn ServerCredentialsFetcher + Send + Sync>>>, } @@ -104,7 +102,6 @@ mod imp { } } - #[allow(clippy::redundant_allocation)] pub fn with_cred( host: String, port: u16, |