aboutsummaryrefslogtreecommitdiff
path: root/src/resp_parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/resp_parser.rs')
-rw-r--r--src/resp_parser.rs6
1 files changed, 3 insertions, 3 deletions
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::<Vec<Vec<u8>>>();
+ .flat_map(|e| String::from_utf8(e.to_resp_bytes()))
+ .collect::<String>();
// 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(),