1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 08:57:00 +02:00

Use immutable reference of service state. Update awc dns resolver. (#1905)

This commit is contained in:
fakeshadow
2021-02-06 17:00:40 -08:00
committed by GitHub
parent 20cf0094e5
commit 41bc04b1c4
65 changed files with 497 additions and 538 deletions

View File

@@ -20,14 +20,14 @@ pub(crate) struct ConnectorWrapper<T>(pub T);
pub(crate) trait Connect {
fn send_request(
&mut self,
&self,
head: RequestHead,
body: Body,
addr: Option<net::SocketAddr>,
) -> Pin<Box<dyn Future<Output = Result<ClientResponse, SendRequestError>>>>;
fn send_request_extra(
&mut self,
&self,
head: Rc<RequestHead>,
extra_headers: Option<HeaderMap>,
body: Body,
@@ -36,7 +36,7 @@ pub(crate) trait Connect {
/// Send request, returns Response and Framed
fn open_tunnel(
&mut self,
&self,
head: RequestHead,
addr: Option<net::SocketAddr>,
) -> Pin<
@@ -52,7 +52,7 @@ pub(crate) trait Connect {
/// Send request and extra headers, returns Response and Framed
fn open_tunnel_extra(
&mut self,
&self,
head: Rc<RequestHead>,
extra_headers: Option<HeaderMap>,
addr: Option<net::SocketAddr>,
@@ -78,7 +78,7 @@ where
T::Future: 'static,
{
fn send_request(
&mut self,
&self,
head: RequestHead,
body: Body,
addr: Option<net::SocketAddr>,
@@ -101,7 +101,7 @@ where
}
fn send_request_extra(
&mut self,
&self,
head: Rc<RequestHead>,
extra_headers: Option<HeaderMap>,
body: Body,
@@ -126,7 +126,7 @@ where
}
fn open_tunnel(
&mut self,
&self,
head: RequestHead,
addr: Option<net::SocketAddr>,
) -> Pin<
@@ -158,7 +158,7 @@ where
}
fn open_tunnel_extra(
&mut self,
&self,
head: Rc<RequestHead>,
extra_headers: Option<HeaderMap>,
addr: Option<net::SocketAddr>,