diff --git a/actix-http/src/builder.rs b/actix-http/src/builder.rs index e06a0c008..63b3a2d4d 100644 --- a/actix-http/src/builder.rs +++ b/actix-http/src/builder.rs @@ -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); diff --git a/actix-http/src/config.rs b/actix-http/src/config.rs index 98895a82f..5b139940e 100644 --- a/actix-http/src/config.rs +++ b/actix-http/src/config.rs @@ -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; diff --git a/actix-http/src/h1/dispatcher.rs b/actix-http/src/h1/dispatcher.rs index c9bbdae37..43d7a5111 100644 --- a/actix-http/src/h1/dispatcher.rs +++ b/actix-http/src/h1/dispatcher.rs @@ -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 diff --git a/actix-http/src/h1/dispatcher_tests.rs b/actix-http/src/h1/dispatcher_tests.rs index ff03881cd..c918fae68 100644 --- a/actix-http/src/h1/dispatcher_tests.rs +++ b/actix-http/src/h1/dispatcher_tests.rs @@ -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}, diff --git a/actix-web/src/server.rs b/actix-web/src/server.rs index e52ad0b37..dca67085f 100644 --- a/actix-web/src/server.rs +++ b/actix-web/src/server.rs @@ -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);