From d7ccbb3d4255fe7906703f1edd4017915095f87d Mon Sep 17 00:00:00 2001 From: Hirotaka Azuma Date: Sat, 27 Aug 2022 14:19:01 +0000 Subject: [PATCH] Review fix: Avoid redundant function calls. --- tokio-postgres/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio-postgres/src/config.rs b/tokio-postgres/src/config.rs index e8d05764..5b364ec0 100644 --- a/tokio-postgres/src/config.rs +++ b/tokio-postgres/src/config.rs @@ -378,7 +378,7 @@ impl Config { /// Gets the time interval between TCP keepalive probes. pub fn get_keepalives_interval(&self) -> Option { - self.keepalive_config.interval.as_ref().copied() + self.keepalive_config.interval } /// Sets the maximum number of TCP keepalive probes that will be sent before dropping a connection. @@ -391,7 +391,7 @@ impl Config { /// Gets the maximum number of TCP keepalive probes that will be sent before dropping a connection. pub fn get_keepalives_retries(&self) -> Option { - self.keepalive_config.retries.as_ref().copied() + self.keepalive_config.retries } /// Sets the requirements of the session.