From 846479e6bcf8238879546534b09e141b9bb668f8 Mon Sep 17 00:00:00 2001 From: omagdy Date: Sun, 20 Jul 2025 16:29:34 +0300 Subject: feat: Added parsing of simple command line arguments and CONFIG GET command implementation --- src/resp_parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/resp_parser.rs') diff --git a/src/resp_parser.rs b/src/resp_parser.rs index 0563188..a00bc1b 100644 --- a/src/resp_parser.rs +++ b/src/resp_parser.rs @@ -587,11 +587,11 @@ impl RespType { let len = arr.len(); let elements = arr .iter() - .map(|e| e.to_resp_bytes()) - .collect::>>(); + .flat_map(|e| String::from_utf8(e.to_resp_bytes())) + .collect::(); // TODO: Implement proper Display for elements because this will definitely not // work - format!("*{:?}\r\n{:?}", len, elements).into_bytes() + format!("*{}\r\n{}", len, elements).into_bytes() } // this is just a hack because the platform uses RESP2 in RESP3 it should be "_\r\n" RespType::Null() => b"$-1\r\n".into(), -- cgit v1.2.3