Review fix: get_connect_timeout returns copied Option.
This commit is contained in:
parent
0fcd0c26a5
commit
4882ecc2de
@ -252,7 +252,7 @@ impl Config {
|
|||||||
|
|
||||||
/// Gets the connection timeout, if one has been set with the
|
/// Gets the connection timeout, if one has been set with the
|
||||||
/// `connect_timeout` method.
|
/// `connect_timeout` method.
|
||||||
pub fn get_connect_timeout(&self) -> Option<&Duration> {
|
pub fn get_connect_timeout(&self) -> Option<Duration> {
|
||||||
self.config.get_connect_timeout()
|
self.config.get_connect_timeout()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,8 +336,8 @@ impl Config {
|
|||||||
|
|
||||||
/// Gets the connection timeout, if one has been set with the
|
/// Gets the connection timeout, if one has been set with the
|
||||||
/// `connect_timeout` method.
|
/// `connect_timeout` method.
|
||||||
pub fn get_connect_timeout(&self) -> Option<&Duration> {
|
pub fn get_connect_timeout(&self) -> Option<Duration> {
|
||||||
self.connect_timeout.as_ref()
|
self.connect_timeout.as_ref().copied()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Controls the use of TCP keepalive.
|
/// Controls the use of TCP keepalive.
|
||||||
|
Loading…
Reference in New Issue
Block a user