Skip to content

Commit 670e786

Browse files
committed
Rename RequestReadTimeout to ReadTimeout
1 parent 2fafc6c commit 670e786

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/async_impl/client.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use super::Body;
1919
use crate::async_impl::h3_client::connect::{H3ClientConfig, H3Connector};
2020
#[cfg(feature = "http3")]
2121
use crate::async_impl::h3_client::H3Client;
22-
use crate::config::{RequestConfig, RequestReadTimeout, RequestTimeout};
22+
use crate::config::{ReadTimeout, RequestConfig, RequestTimeout};
2323
use crate::connect::{
2424
sealed::{Conn, Unnameable},
2525
BoxedConnectorLayer, BoxedConnectorService, Connector, ConnectorBuilder,
@@ -2516,7 +2516,6 @@ impl Client {
25162516
.map(Box::pin);
25172517

25182518
let read_timeout = self.inner.read_timeout.fetch(&extensions).copied();
2519-
25202519
let read_timeout_fut = read_timeout.map(tokio::time::sleep).map(Box::pin);
25212520

25222521
Pending {
@@ -2765,7 +2764,7 @@ struct ClientRef {
27652764
h3_client: Option<FollowRedirect<H3Client, TowerRedirectPolicy>>,
27662765
referer: bool,
27672766
request_timeout: RequestConfig<RequestTimeout>,
2768-
read_timeout: RequestConfig<RequestReadTimeout>,
2767+
read_timeout: RequestConfig<ReadTimeout>,
27692768
proxies: Arc<Vec<ProxyMatcher>>,
27702769
proxies_maybe_http_auth: bool,
27712770
proxies_maybe_http_custom_headers: bool,

src/async_impl/request.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use super::client::{Client, Pending};
1212
#[cfg(feature = "multipart")]
1313
use super::multipart;
1414
use super::response::Response;
15-
use crate::config::{RequestConfig, RequestReadTimeout, RequestTimeout};
15+
use crate::config::{ReadTimeout, RequestConfig, RequestTimeout};
1616
#[cfg(feature = "multipart")]
1717
use crate::header::CONTENT_LENGTH;
1818
use crate::header::{HeaderMap, HeaderName, HeaderValue, CONTENT_TYPE};
@@ -127,13 +127,13 @@ impl Request {
127127
/// Get the read timeout.
128128
#[inline]
129129
pub fn read_timeout(&self) -> Option<&Duration> {
130-
RequestConfig::<RequestReadTimeout>::get(&self.extensions)
130+
RequestConfig::<ReadTimeout>::get(&self.extensions)
131131
}
132132

133133
/// Get a mutable reference to the read timeout.
134134
#[inline]
135135
pub fn read_timeout_mut(&mut self) -> &mut Option<Duration> {
136-
RequestConfig::<RequestReadTimeout>::get_mut(&mut self.extensions)
136+
RequestConfig::<ReadTimeout>::get_mut(&mut self.extensions)
137137
}
138138

139139
/// Get the http version.

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ impl RequestConfigValue for RequestTimeout {
110110
}
111111

112112
#[derive(Clone, Copy)]
113-
pub(crate) struct RequestReadTimeout;
113+
pub(crate) struct ReadTimeout;
114114

115-
impl RequestConfigValue for RequestReadTimeout {
115+
impl RequestConfigValue for ReadTimeout {
116116
type Value = Duration;
117117
}

0 commit comments

Comments
 (0)