We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4237843 + a2ca75e commit cd31c02Copy full SHA for cd31c02
1 file changed
tokio-postgres/src/connect.rs
@@ -25,14 +25,15 @@ where
25
26
let mut error = None;
27
for (i, host) in config.host.iter().enumerate() {
28
- let port = *config
+ let port = config
29
.port
30
.get(i)
31
.or_else(|| config.port.get(0))
32
- .unwrap_or(&5432);
+ .copied()
33
+ .unwrap_or(5432);
34
35
let hostname = match host {
- Host::Tcp(host) => &**host,
36
+ Host::Tcp(host) => host.as_str(),
37
// postgres doesn't support TLS over unix sockets, so the choice here doesn't matter
38
#[cfg(unix)]
39
Host::Unix(_) => "",
0 commit comments