From 86183e56adab4fe4052aae8f505e49f97b0e9873 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 13 Dec 2024 19:31:12 +0100 Subject: [PATCH] commands: add some TODOs for assumptions made about syntax --- src/commands/connection_settings/protocol_disable.rs | 9 +++++---- src/commands/connection_settings/protocol_enable.rs | 9 +++++---- src/commands/connection_settings/tag_types_disable.rs | 1 + src/commands/connection_settings/tag_types_enable.rs | 1 + src/commands/connection_settings/tag_types_reset.rs | 1 + 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/commands/connection_settings/protocol_disable.rs b/src/commands/connection_settings/protocol_disable.rs index 07da518..d4ad89b 100644 --- a/src/commands/connection_settings/protocol_disable.rs +++ b/src/commands/connection_settings/protocol_disable.rs @@ -17,12 +17,13 @@ impl Command for ProtocolDisable { return Err(RequestParserError::UnexpectedEOF); } - let mut protocols = Vec::new(); - for protocol in parts { - protocols.push(protocol.to_string()); + // TODO: verify that the features are split by whitespace + let mut features = Vec::new(); + for feature in parts { + features.push(feature.to_string()); } - Ok((Request::ProtocolDisable(protocols), "")) + Ok((Request::ProtocolDisable(features), "")) } fn parse_response( diff --git a/src/commands/connection_settings/protocol_enable.rs b/src/commands/connection_settings/protocol_enable.rs index 6fb1363..42b3c7d 100644 --- a/src/commands/connection_settings/protocol_enable.rs +++ b/src/commands/connection_settings/protocol_enable.rs @@ -17,12 +17,13 @@ impl Command for ProtocolEnable { return Err(RequestParserError::UnexpectedEOF); } - let mut protocols = Vec::new(); - for protocol in parts { - protocols.push(protocol.to_string()); + // TODO: verify that the features are split by whitespace + let mut features = Vec::new(); + for feature in parts { + features.push(feature.to_string()); } - Ok((Request::ProtocolEnable(protocols), "")) + Ok((Request::ProtocolEnable(features), "")) } fn parse_response( diff --git a/src/commands/connection_settings/tag_types_disable.rs b/src/commands/connection_settings/tag_types_disable.rs index ddf932a..85550ba 100644 --- a/src/commands/connection_settings/tag_types_disable.rs +++ b/src/commands/connection_settings/tag_types_disable.rs @@ -17,6 +17,7 @@ impl Command for TagTypesDisable { return Err(RequestParserError::UnexpectedEOF); } + // TODO: verify that the tag types are split by whitespace let mut tag_types = Vec::new(); for tag_type in parts { tag_types.push(tag_type.to_string()); diff --git a/src/commands/connection_settings/tag_types_enable.rs b/src/commands/connection_settings/tag_types_enable.rs index 0184b78..0d78df9 100644 --- a/src/commands/connection_settings/tag_types_enable.rs +++ b/src/commands/connection_settings/tag_types_enable.rs @@ -17,6 +17,7 @@ impl Command for TagTypesEnable { return Err(RequestParserError::UnexpectedEOF); } + // TODO: verify that the tag types are split by whitespace let mut tag_types = Vec::new(); for tag_type in parts { tag_types.push(tag_type.to_string()); diff --git a/src/commands/connection_settings/tag_types_reset.rs b/src/commands/connection_settings/tag_types_reset.rs index 844e28b..31880a1 100644 --- a/src/commands/connection_settings/tag_types_reset.rs +++ b/src/commands/connection_settings/tag_types_reset.rs @@ -17,6 +17,7 @@ impl Command for TagTypesReset { return Err(RequestParserError::UnexpectedEOF); } + // TODO: verify that the tag types are split by whitespace let mut tag_types = Vec::new(); for tag_type in parts { tag_types.push(tag_type.to_string());