1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

cleanup and cargo fmt

This commit is contained in:
Nikolay Kim
2018-05-20 21:03:29 -07:00
parent 2d97219195
commit e4f1833215
28 changed files with 108 additions and 112 deletions

View File

@ -9,8 +9,9 @@ extern crate prost;
#[macro_use]
extern crate prost_derive;
use actix_web::{http, middleware, server, App, AsyncResponder, Error, HttpRequest,
HttpResponse};
use actix_web::{
http, middleware, server, App, AsyncResponder, Error, HttpRequest, HttpResponse,
};
use futures::Future;
mod protobuf;

View File

@ -132,7 +132,8 @@ where
}
let limit = self.limit;
let fut = req.from_err()
let fut = req
.from_err()
.fold(BytesMut::new(), move |mut body, chunk| {
if (body.len() + chunk.len()) > limit {
Err(ProtoBufPayloadError::Overflow)