mirror of
https://github.com/actix/actix-web.git
synced 2024-11-29 21:11:17 +00:00
Run rustfmt
This commit is contained in:
parent
7941594f94
commit
0d5646a8b6
2 changed files with 7 additions and 6 deletions
|
@ -78,8 +78,7 @@ impl Connector<(), ()> {
|
|||
|
||||
// Build Ssl connector with openssl, based on supplied alpn protocols
|
||||
#[cfg(feature = "openssl")]
|
||||
fn build_ssl(protocols: Vec<Vec<u8>>) -> SslConnector
|
||||
{
|
||||
fn build_ssl(protocols: Vec<Vec<u8>>) -> SslConnector {
|
||||
use actix_connect::ssl::openssl::SslMethod;
|
||||
use bytes::{BufMut, BytesMut};
|
||||
|
||||
|
@ -98,8 +97,7 @@ impl Connector<(), ()> {
|
|||
|
||||
// Build Ssl connector with rustls, based on supplied alpn protocols
|
||||
#[cfg(all(not(feature = "openssl"), feature = "rustls"))]
|
||||
fn build_ssl(protocols: Vec<Vec<u8>>) -> SslConnector
|
||||
{
|
||||
fn build_ssl(protocols: Vec<Vec<u8>>) -> SslConnector {
|
||||
let mut config = ClientConfig::new();
|
||||
config.set_protocols(&protocols);
|
||||
config
|
||||
|
@ -169,7 +167,9 @@ where
|
|||
let versions = match val {
|
||||
http::Version::HTTP_11 => vec![b"http/1.1".to_vec()],
|
||||
http::Version::HTTP_2 => vec![b"h2".to_vec(), b"http/1.1".to_vec()],
|
||||
_ => unimplemented!("actix-http:client: supported versions http/1.1, http/2"),
|
||||
_ => {
|
||||
unimplemented!("actix-http:client: supported versions http/1.1, http/2")
|
||||
}
|
||||
};
|
||||
self.ssl = Connector::build_ssl(versions);
|
||||
self
|
||||
|
|
|
@ -395,7 +395,8 @@ where
|
|||
Poll::Ready(Ok(req)) => {
|
||||
self.as_mut().send_continue();
|
||||
this = self.as_mut().project();
|
||||
this.state.set(State::ServiceCall(Box::pin(this.service.call(req))));
|
||||
this.state
|
||||
.set(State::ServiceCall(Box::pin(this.service.call(req))));
|
||||
continue;
|
||||
}
|
||||
Poll::Ready(Err(e)) => {
|
||||
|
|
Loading…
Reference in a new issue