commands: add some TODOs for assumptions made about syntax

This commit is contained in:
Oystein Kristoffer Tveit 2024-12-13 19:31:12 +01:00
parent 6a9cd00275
commit 86183e56ad
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
5 changed files with 13 additions and 8 deletions

View File

@ -17,12 +17,13 @@ impl Command for ProtocolDisable {
return Err(RequestParserError::UnexpectedEOF); return Err(RequestParserError::UnexpectedEOF);
} }
let mut protocols = Vec::new(); // TODO: verify that the features are split by whitespace
for protocol in parts { let mut features = Vec::new();
protocols.push(protocol.to_string()); for feature in parts {
features.push(feature.to_string());
} }
Ok((Request::ProtocolDisable(protocols), "")) Ok((Request::ProtocolDisable(features), ""))
} }
fn parse_response( fn parse_response(

View File

@ -17,12 +17,13 @@ impl Command for ProtocolEnable {
return Err(RequestParserError::UnexpectedEOF); return Err(RequestParserError::UnexpectedEOF);
} }
let mut protocols = Vec::new(); // TODO: verify that the features are split by whitespace
for protocol in parts { let mut features = Vec::new();
protocols.push(protocol.to_string()); for feature in parts {
features.push(feature.to_string());
} }
Ok((Request::ProtocolEnable(protocols), "")) Ok((Request::ProtocolEnable(features), ""))
} }
fn parse_response( fn parse_response(

View File

@ -17,6 +17,7 @@ impl Command for TagTypesDisable {
return Err(RequestParserError::UnexpectedEOF); return Err(RequestParserError::UnexpectedEOF);
} }
// TODO: verify that the tag types are split by whitespace
let mut tag_types = Vec::new(); let mut tag_types = Vec::new();
for tag_type in parts { for tag_type in parts {
tag_types.push(tag_type.to_string()); tag_types.push(tag_type.to_string());

View File

@ -17,6 +17,7 @@ impl Command for TagTypesEnable {
return Err(RequestParserError::UnexpectedEOF); return Err(RequestParserError::UnexpectedEOF);
} }
// TODO: verify that the tag types are split by whitespace
let mut tag_types = Vec::new(); let mut tag_types = Vec::new();
for tag_type in parts { for tag_type in parts {
tag_types.push(tag_type.to_string()); tag_types.push(tag_type.to_string());

View File

@ -17,6 +17,7 @@ impl Command for TagTypesReset {
return Err(RequestParserError::UnexpectedEOF); return Err(RequestParserError::UnexpectedEOF);
} }
// TODO: verify that the tag types are split by whitespace
let mut tag_types = Vec::new(); let mut tag_types = Vec::new();
for tag_type in parts { for tag_type in parts {
tag_types.push(tag_type.to_string()); tag_types.push(tag_type.to_string());