tests: Avoid clippy warning of unhandled I/O bytes
Fixes beta clippy issue:
error: read amount is not handled
--> tests/integration.rs:2121:15
|
2121 | match pty.read(&mut buf) {
| ^^^^^^^^^^^^^^^^^^
|
= help: use `Read::read_exact` instead, or handle partial reads
note: the result is consumed here, but the amount of I/O bytes remains unhandled
--> tests/integration.rs:2122:13
|
2122 | / Ok(_) => {
2123 | | let output = std::str::from_utf8(&buf).unwrap().to_string();
2124 | | match tx.send(output) {
2125 | | Ok(_) => (),
2126 | | Err(_) => break,
2127 | | }
2128 | | }
| |_____________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount
= note: `#[deny(clippy::unused_io_amount)]` on by default
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
107f4bdc12
commit
36890373cd
1 changed files with 1 additions and 1 deletions
|
|
@ -2119,7 +2119,7 @@ fn pty_read(mut pty: std::fs::File) -> Receiver<String> {
|
|||
thread::sleep(std::time::Duration::new(1, 0));
|
||||
let mut buf = [0; 512];
|
||||
match pty.read(&mut buf) {
|
||||
Ok(_) => {
|
||||
Ok(_bytes) => {
|
||||
let output = std::str::from_utf8(&buf).unwrap().to_string();
|
||||
match tx.send(output) {
|
||||
Ok(_) => (),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue