1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-27 10:30:33 +00:00

Run rustfmt

This commit is contained in:
Yuki Okushi 2020-03-08 00:52:39 +09:00
parent 7941594f94
commit 0d5646a8b6
No known key found for this signature in database
GPG key ID: B0986C85C0E2DAA1
2 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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)) => {