Skip to content

Commit a2ca75e

Browse files
committed
Prettify host cast as str
1 parent 391a54a commit a2ca75e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tokio-postgres/src/connect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ where
3333
.unwrap_or(5432);
3434

3535
let hostname = match host {
36-
Host::Tcp(host) => &**host,
36+
Host::Tcp(host) => host.as_str(),
3737
// postgres doesn't support TLS over unix sockets, so the choice here doesn't matter
3838
#[cfg(unix)]
3939
Host::Unix(_) => "",

0 commit comments

Comments
 (0)