Skip to content

Commit

Permalink
Run rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Mar 7, 2020
1 parent 7941594 commit 0d5646a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions actix-http/src/client/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion actix-http/src/h1/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) => {
Expand Down

0 comments on commit 0d5646a

Please sign in to comment.