mirror of https://github.com/fafhrd91/actix-web
Fix formatting
This commit is contained in:
parent
ee7e37c62f
commit
9320df6339
|
@ -128,7 +128,7 @@ where
|
|||
|
||||
/// Set maximum buffer size.
|
||||
///
|
||||
/// Defines the maximum size of the buffer. When the size is reached, the dispatcher
|
||||
/// Defines the maximum size of the buffer. When the size is reached, the dispatcher
|
||||
/// will flush the data to the IO streams
|
||||
pub fn max_buffer_size(mut self, size: usize) -> Self {
|
||||
self.max_buffer_size = Some(size);
|
||||
|
|
|
@ -151,8 +151,14 @@ mod tests {
|
|||
|
||||
#[actix_rt::test]
|
||||
async fn test_date_service_update() {
|
||||
let settings =
|
||||
ServiceConfig::new(KeepAlive::Os, Duration::ZERO, Duration::ZERO, None, false, None);
|
||||
let settings = ServiceConfig::new(
|
||||
KeepAlive::Os,
|
||||
Duration::ZERO,
|
||||
Duration::ZERO,
|
||||
None,
|
||||
false,
|
||||
None,
|
||||
);
|
||||
|
||||
yield_now().await;
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@ where
|
|||
StateProj::SendPayload { mut body } => {
|
||||
// keep populate writer buffer until buffer size limit hit,
|
||||
// get blocked or finished.
|
||||
while this.write_buf.len() < *this.max_buffer_size /*super::payload::MAX_BUFFER_SIZE*/ {
|
||||
while this.write_buf.len() < *this.max_buffer_size {
|
||||
match body.as_mut().poll_next(cx) {
|
||||
Poll::Ready(Some(Ok(item))) => {
|
||||
this.codec
|
||||
|
@ -534,7 +534,7 @@ where
|
|||
|
||||
// keep populate writer buffer until buffer size limit hit,
|
||||
// get blocked or finished.
|
||||
while this.write_buf.len() < *this.max_buffer_size /*super::payload::MAX_BUFFER_SIZE*/ {
|
||||
while this.write_buf.len() < *this.max_buffer_size {
|
||||
match body.as_mut().poll_next(cx) {
|
||||
Poll::Ready(Some(Ok(item))) => {
|
||||
this.codec
|
||||
|
|
|
@ -10,7 +10,7 @@ use futures_util::future::lazy;
|
|||
use super::dispatcher::{Dispatcher, DispatcherState, DispatcherStateProj, Flags};
|
||||
use crate::{
|
||||
body::MessageBody,
|
||||
config::{ServiceConfig},
|
||||
config::ServiceConfig,
|
||||
h1::{Codec, ExpectHandler, UpgradeHandler},
|
||||
service::HttpFlow,
|
||||
test::{TestBuffer, TestSeqBuffer},
|
||||
|
|
|
@ -238,7 +238,7 @@ where
|
|||
|
||||
/// Set maximum buffer size.
|
||||
///
|
||||
/// Defines the maximum size of the write buffer. When the size is reached, the dispatcher
|
||||
/// Defines the maximum size of the write buffer. When the size is reached, the dispatcher
|
||||
/// will flush the data to the IO streams
|
||||
pub fn max_buffer_size(self, size: usize) -> Self {
|
||||
self.config.lock().unwrap().max_buffer_size = Some(size);
|
||||
|
|
Loading…
Reference in New Issue