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:
@ -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;
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user