From c9b0337801357b18c40485b4bf8dd183b753bafa Mon Sep 17 00:00:00 2001 From: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com> Date: Thu, 16 Feb 2023 01:54:47 +0100 Subject: [PATCH] fix: Typo in MAX_RESPONSE_LENGTH --- src/response/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/response/parser.rs b/src/response/parser.rs index 3d80ae6..d02aaf7 100644 --- a/src/response/parser.rs +++ b/src/response/parser.rs @@ -27,7 +27,7 @@ use crate::{request::parser::Rfc5321Parser, *}; use super::*; -pub const MAX_REPONSE_LENGTH: usize = 4096; +pub const MAX_RESPONSE_LENGTH: usize = 4096; #[derive(Default)] pub struct ResponseReceiver { @@ -145,7 +145,7 @@ impl ResponseReceiver { _ => match ch { b'\r' | b'\n' => (), _ => { - if self.buf.len() < MAX_REPONSE_LENGTH { + if self.buf.len() < MAX_RESPONSE_LENGTH { self.buf.push(ch); } else { return Err(Error::ResponseTooLong); @@ -351,7 +351,7 @@ impl EhloResponse { parser.seek_lf()?; break; } - ch if buf.len() < MAX_REPONSE_LENGTH => { + ch if buf.len() < MAX_RESPONSE_LENGTH => { buf.push(ch); } _ => return Err(Error::ResponseTooLong),