mirror of
https://github.com/fafhrd91/actix-web
synced 2024-12-18 01:43:58 +01:00
fmt
This commit is contained in:
parent
ae64475d98
commit
a548b69679
@ -693,11 +693,12 @@ where
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// read socket into a buf
|
// read socket into a buf
|
||||||
let should_disconnect = if !inner.flags.contains(Flags::READ_DISCONNECT) {
|
let should_disconnect =
|
||||||
read_available(&mut inner.io, &mut inner.read_buf)?
|
if !inner.flags.contains(Flags::READ_DISCONNECT) {
|
||||||
} else {
|
read_available(&mut inner.io, &mut inner.read_buf)?
|
||||||
None
|
} else {
|
||||||
};
|
None
|
||||||
|
};
|
||||||
|
|
||||||
inner.poll_request()?;
|
inner.poll_request()?;
|
||||||
if let Some(true) = should_disconnect {
|
if let Some(true) = should_disconnect {
|
||||||
|
@ -156,4 +156,4 @@ pub fn patch(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||||||
let args = parse_macro_input!(args as syn::AttributeArgs);
|
let args = parse_macro_input!(args as syn::AttributeArgs);
|
||||||
let gen = route::Args::new(&args, input, route::GuardType::Patch);
|
let gen = route::Args::new(&args, input, route::GuardType::Patch);
|
||||||
gen.generate()
|
gen.generate()
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ pub enum GuardType {
|
|||||||
Connect,
|
Connect,
|
||||||
Options,
|
Options,
|
||||||
Trace,
|
Trace,
|
||||||
Patch
|
Patch,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for GuardType {
|
impl fmt::Display for GuardType {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use actix_http::HttpService;
|
use actix_http::HttpService;
|
||||||
use actix_http_test::TestServer;
|
use actix_http_test::TestServer;
|
||||||
use actix_web::{http, web::Path, App, HttpResponse, Responder};
|
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};
|
use futures::{future, Future};
|
||||||
|
|
||||||
#[get("/test")]
|
#[get("/test")]
|
||||||
|
Loading…
Reference in New Issue
Block a user