Implement a proper request tokenizer
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
use crate::commands::{
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
use crate::{
|
||||
request_tokenizer::RequestTokenizer,
|
||||
commands::{
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
},
|
||||
};
|
||||
|
||||
pub struct BinaryLimit;
|
||||
@@ -14,7 +17,7 @@ impl Command for BinaryLimit {
|
||||
format!("{} {}", Self::COMMAND, request)
|
||||
}
|
||||
|
||||
fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
|
||||
fn parse_request(mut parts: RequestTokenizer<'_>) -> RequestParserResult<'_> {
|
||||
let limit = parts.next().ok_or(RequestParserError::UnexpectedEOF)?;
|
||||
let limit = limit
|
||||
.parse()
|
||||
|
||||
Reference in New Issue
Block a user