1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 14:49:20 +02:00

standardize rustfmt max_width

This commit is contained in:
Rob Ede
2021-12-08 06:01:11 +00:00
parent e49e559f47
commit 406f694095
48 changed files with 192 additions and 335 deletions

View File

@ -25,10 +25,7 @@ async fn main() -> io::Result<()> {
Ok::<_, Error>(
Response::build(StatusCode::OK)
.insert_header((
"x-head",
HeaderValue::from_static("dummy value!"),
))
.insert_header(("x-head", HeaderValue::from_static("dummy value!")))
.body(body),
)
})

View File

@ -1,8 +1,7 @@
use std::io;
use actix_http::{
body::MessageBody, header::HeaderValue, Error, HttpService, Request, Response,
StatusCode,
body::MessageBody, header::HeaderValue, Error, HttpService, Request, Response, StatusCode,
};
use actix_server::Server;
use bytes::BytesMut;

View File

@ -17,10 +17,7 @@ async fn main() -> io::Result<()> {
log::info!("{:?}", req);
let mut res = Response::build(StatusCode::OK);
res.insert_header((
"x-head",
HeaderValue::from_static("dummy value!"),
));
res.insert_header(("x-head", HeaderValue::from_static("dummy value!")));
Ok::<_, Infallible>(res.body("Hello world!"))
})

View File

@ -60,10 +60,7 @@ impl Heartbeat {
impl Stream for Heartbeat {
type Item = Result<Bytes, Error>;
fn poll_next(
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Item>> {
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
log::trace!("poll");
ready!(self.as_mut().interval.poll_tick(cx));