From a548b69679ebec4be9bb280e9e1fd88707d6790d Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 5 Jun 2019 08:43:13 +0600 Subject: [PATCH] fmt --- actix-http/src/h1/dispatcher.rs | 11 ++++++----- actix-web-codegen/src/lib.rs | 2 +- actix-web-codegen/src/route.rs | 2 +- actix-web-codegen/tests/test_macro.rs | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/actix-http/src/h1/dispatcher.rs b/actix-http/src/h1/dispatcher.rs index b7b9db2d7..220984f8d 100644 --- a/actix-http/src/h1/dispatcher.rs +++ b/actix-http/src/h1/dispatcher.rs @@ -693,11 +693,12 @@ where } } else { // read socket into a buf - let should_disconnect = if !inner.flags.contains(Flags::READ_DISCONNECT) { - read_available(&mut inner.io, &mut inner.read_buf)? - } else { - None - }; + let should_disconnect = + if !inner.flags.contains(Flags::READ_DISCONNECT) { + read_available(&mut inner.io, &mut inner.read_buf)? + } else { + None + }; inner.poll_request()?; if let Some(true) = should_disconnect { diff --git a/actix-web-codegen/src/lib.rs b/actix-web-codegen/src/lib.rs index 99abbb6a3..b3ae7dd9b 100644 --- a/actix-web-codegen/src/lib.rs +++ b/actix-web-codegen/src/lib.rs @@ -156,4 +156,4 @@ pub fn patch(args: TokenStream, input: TokenStream) -> TokenStream { let args = parse_macro_input!(args as syn::AttributeArgs); let gen = route::Args::new(&args, input, route::GuardType::Patch); gen.generate() -} \ No newline at end of file +} diff --git a/actix-web-codegen/src/route.rs b/actix-web-codegen/src/route.rs index 3b890c1cb..268adecb0 100644 --- a/actix-web-codegen/src/route.rs +++ b/actix-web-codegen/src/route.rs @@ -29,7 +29,7 @@ pub enum GuardType { Connect, Options, Trace, - Patch + Patch, } impl fmt::Display for GuardType { diff --git a/actix-web-codegen/tests/test_macro.rs b/actix-web-codegen/tests/test_macro.rs index 718728879..f02b82f00 100644 --- a/actix-web-codegen/tests/test_macro.rs +++ b/actix-web-codegen/tests/test_macro.rs @@ -1,7 +1,7 @@ use actix_http::HttpService; use actix_http_test::TestServer; use actix_web::{http, web::Path, App, HttpResponse, Responder}; -use actix_web_codegen::{delete, get, post, put, patch, head, connect, options, trace}; +use actix_web_codegen::{connect, delete, get, head, options, patch, post, put, trace}; use futures::{future, Future}; #[get("/test")]