Skip to content

Commit d7ccbb3

Browse files
author
Hirotaka Azuma
committed
Review fix: Avoid redundant function calls.
1 parent 5551b3e commit d7ccbb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tokio-postgres/src/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl Config {
378378

379379
/// Gets the time interval between TCP keepalive probes.
380380
pub fn get_keepalives_interval(&self) -> Option<Duration> {
381-
self.keepalive_config.interval.as_ref().copied()
381+
self.keepalive_config.interval
382382
}
383383

384384
/// Sets the maximum number of TCP keepalive probes that will be sent before dropping a connection.
@@ -391,7 +391,7 @@ impl Config {
391391

392392
/// Gets the maximum number of TCP keepalive probes that will be sent before dropping a connection.
393393
pub fn get_keepalives_retries(&self) -> Option<u32> {
394-
self.keepalive_config.retries.as_ref().copied()
394+
self.keepalive_config.retries
395395
}
396396

397397
/// Sets the requirements of the session.

0 commit comments

Comments
 (0)