Skip to content

Commit 5551b3e

Browse files
author
Hirotaka Azuma
committed
Revert "Review fix: get_connect_timeout returns copied Option."
This reverts commit 4882ecc.
1 parent 4882ecc commit 5551b3e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

postgres/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ impl Config {
252252

253253
/// Gets the connection timeout, if one has been set with the
254254
/// `connect_timeout` method.
255-
pub fn get_connect_timeout(&self) -> Option<Duration> {
255+
pub fn get_connect_timeout(&self) -> Option<&Duration> {
256256
self.config.get_connect_timeout()
257257
}
258258

tokio-postgres/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ impl Config {
336336

337337
/// Gets the connection timeout, if one has been set with the
338338
/// `connect_timeout` method.
339-
pub fn get_connect_timeout(&self) -> Option<Duration> {
340-
self.connect_timeout.as_ref().copied()
339+
pub fn get_connect_timeout(&self) -> Option<&Duration> {
340+
self.connect_timeout.as_ref()
341341
}
342342

343343
/// Controls the use of TCP keepalive.

0 commit comments

Comments
 (0)