rust/tests/ui/unused_io_amount.stderr

165 lines
4.8 KiB
Plaintext
Raw Normal View History

error: written amount is not handled
--> $DIR/unused_io_amount.rs:9:5
|
LL | s.write(b"test")?;
| ^^^^^^^^^^^^^^^^^
|
= help: use `Write::write_all` instead, or handle partial writes
2022-09-22 11:04:22 -05:00
= note: `-D clippy::unused-io-amount` implied by `-D warnings`
error: read amount is not handled
--> $DIR/unused_io_amount.rs:12:5
|
2018-12-27 09:57:55 -06:00
LL | s.read(&mut buf)?;
| ^^^^^^^^^^^^^^^^^
|
= help: use `Read::read_exact` instead, or handle partial reads
error: written amount is not handled
--> $DIR/unused_io_amount.rs:18:5
|
2018-12-27 09:57:55 -06:00
LL | s.write(b"test").unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Write::write_all` instead, or handle partial writes
error: read amount is not handled
--> $DIR/unused_io_amount.rs:21:5
|
2018-12-27 09:57:55 -06:00
LL | s.read(&mut buf).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Read::read_exact` instead, or handle partial reads
error: read amount is not handled
--> $DIR/unused_io_amount.rs:26:5
|
LL | s.read_vectored(&mut [io::IoSliceMut::new(&mut [])])?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: written amount is not handled
--> $DIR/unused_io_amount.rs:28:5
|
LL | s.write_vectored(&[io::IoSlice::new(&[])])?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: read amount is not handled
--> $DIR/unused_io_amount.rs:36:5
|
LL | reader.read(&mut result).ok()?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Read::read_exact` instead, or handle partial reads
error: read amount is not handled
--> $DIR/unused_io_amount.rs:46:5
|
LL | reader.read(&mut result).or_else(|err| Err(err))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Read::read_exact` instead, or handle partial reads
error: read amount is not handled
--> $DIR/unused_io_amount.rs:59:5
|
LL | reader.read(&mut result).or(Err(Error::Kind))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Read::read_exact` instead, or handle partial reads
error: read amount is not handled
--> $DIR/unused_io_amount.rs:67:5
|
LL | / reader
LL | |
LL | | .read(&mut result)
LL | | .or(Err(Error::Kind))
LL | | .or(Err(Error::Kind))
LL | | .expect("error");
| |________________________^
|
= help: use `Read::read_exact` instead, or handle partial reads
error: written amount is not handled
--> $DIR/unused_io_amount.rs:77:5
|
LL | s.write(b"ok").is_ok();
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Write::write_all` instead, or handle partial writes
error: written amount is not handled
--> $DIR/unused_io_amount.rs:79:5
|
LL | s.write(b"err").is_err();
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Write::write_all` instead, or handle partial writes
error: read amount is not handled
--> $DIR/unused_io_amount.rs:82:5
|
LL | s.read(&mut buf).is_ok();
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Read::read_exact` instead, or handle partial reads
error: read amount is not handled
--> $DIR/unused_io_amount.rs:84:5
|
LL | s.read(&mut buf).is_err();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `Read::read_exact` instead, or handle partial reads
error: written amount is not handled
--> $DIR/unused_io_amount.rs:89:5
|
LL | w.write(b"hello world").await.unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `AsyncWriteExt::write_all` instead, or handle partial writes
error: read amount is not handled
--> $DIR/unused_io_amount.rs:95:5
|
LL | r.read(&mut buf[..]).await.unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `AsyncReadExt::read_exact` instead, or handle partial reads
error: written amount is not handled
--> $DIR/unused_io_amount.rs:109:9
|
LL | w.write(b"hello world").await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `AsyncWriteExt::write_all` instead, or handle partial writes
error: read amount is not handled
--> $DIR/unused_io_amount.rs:118:9
|
LL | r.read(&mut buf[..]).await.or(Err(Error::Kind))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `AsyncReadExt::read_exact` instead, or handle partial reads
error: written amount is not handled
--> $DIR/unused_io_amount.rs:127:5
|
LL | w.write(b"hello world").await.unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `AsyncWriteExt::write_all` instead, or handle partial writes
error: read amount is not handled
--> $DIR/unused_io_amount.rs:133:5
|
LL | r.read(&mut buf[..]).await.unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `AsyncReadExt::read_exact` instead, or handle partial reads
error: aborting due to 20 previous errors
2018-01-16 10:06:27 -06:00