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

rustfmt 0.7

This commit is contained in:
Nikolay Kim
2018-05-17 12:20:20 -07:00
parent 564cc15c04
commit 45e9aaa462
58 changed files with 508 additions and 758 deletions

View File

@@ -62,7 +62,9 @@ mod frame;
mod mask;
mod proto;
pub use self::client::{Client, ClientError, ClientHandshake, ClientReader, ClientWriter};
pub use self::client::{
Client, ClientError, ClientHandshake, ClientReader, ClientWriter,
};
pub use self::context::WebsocketContext;
pub use self::frame::Frame;
pub use self::proto::{CloseCode, CloseReason, OpCode};
@@ -216,9 +218,7 @@ pub fn handshake<S>(
}
// check supported version
if !req.headers()
.contains_key(header::SEC_WEBSOCKET_VERSION)
{
if !req.headers().contains_key(header::SEC_WEBSOCKET_VERSION) {
return Err(HandshakeError::NoVersionHeader);
}
let supported_ver = {
@@ -387,10 +387,7 @@ mod tests {
);
let mut headers = HeaderMap::new();
headers.insert(
header::UPGRADE,
header::HeaderValue::from_static("test"),
);
headers.insert(header::UPGRADE, header::HeaderValue::from_static("test"));
let req = HttpRequest::new(
Method::GET,
Uri::from_str("/").unwrap(),