Do not print the CR

This commit is contained in:
Rodolphe Bréard 2023-04-15 19:24:35 +02:00
parent 08297ac5e0
commit 0c921e4fdd

View file

@ -118,6 +118,11 @@ impl Message {
}
async fn print_line(&self, line: &[u8]) -> Result<()> {
let line = if line.ends_with(&[b'\r']) {
&line[..line.len() - 1]
} else {
line
};
let mut stdout = BufWriter::new(tokio::io::stdout());
stdout.write_all(RETURN_START).await?;
stdout.write_all(self.session_id.as_bytes()).await?;