diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-12-01 11:40:22 +0100 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-12-01 11:55:01 +0100 |
commit | 03aa117aac3451ffdd7ede9a6eefa0d478eea04e (patch) | |
tree | b153c4762053671fd8eb6e24ef215853f21b9597 | |
parent | 59c8fd0cc5944b1699e55fd1ed6cd64e37b5500a (diff) |
Try a 1-length buffernora/tokio10_debugging
-rw-r--r-- | ipc/src/assuan/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/src/assuan/mod.rs b/ipc/src/assuan/mod.rs index c475aaef..0108e75f 100644 --- a/ipc/src/assuan/mod.rs +++ b/ipc/src/assuan/mod.rs @@ -305,7 +305,7 @@ impl Stream for Client { // First, get a new read buffer. // Later, append the read data to the Client's buffer - let mut vec = vec![0; MAX_LINE_LENGTH]; + let mut vec = vec![0; 1]; let mut read_buf = tokio::io::ReadBuf::new(&mut vec); match reader.as_mut().poll_read(cx, &mut read_buf)? { @@ -319,7 +319,7 @@ impl Stream for Client { //} - eprintln!("GOT: {}", String::from_utf8(read_buf.filled().into()).unwrap()); + eprintln!("GOT: {}", String::from_utf8_lossy(read_buf.filled())); if read_buf.filled().is_empty() { // End of stream. return Poll::Ready(None) |