examples: fix the write length in the connect-tcp example (#7581)

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
This commit is contained in:
Martin Grigorov
2025-09-06 15:49:07 +08:00
committed by GitHub
parent 3eb515e1a7
commit c9b4e4c110
+1 -1
View File
@@ -85,7 +85,7 @@ async fn recv(
let n = reader.recv(&mut buf[..]).await?;
if n > 0 {
stdout.send(Bytes::from(buf)).await?;
stdout.send(Bytes::copy_from_slice(&buf[..n])).await?;
}
}
}