Fix formatting

This commit is contained in:
Nicolas 2025-06-01 18:37:55 +10:00
parent ee7e37c62f
commit 9320df6339
5 changed files with 13 additions and 7 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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},

View File

@ -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);