mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
64 lines
1.8 KiB
Text
64 lines
1.8 KiB
Text
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:21:5
|
|
|
|
|
LL | f.read_exact(&mut data).unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `data.resize(20, 0); f.read_exact(&mut data).unwrap();`
|
|
|
|
|
= note: `-D clippy::read-zero-byte-vec` implied by `-D warnings`
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:27:5
|
|
|
|
|
LL | f.read_exact(&mut data2)?;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `data2.resize(cap, 0); f.read_exact(&mut data2)?;`
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:32:5
|
|
|
|
|
LL | f.read_exact(&mut data3)?;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:37:5
|
|
|
|
|
LL | let _ = f.read(&mut data4)?;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:43:9
|
|
|
|
|
LL | f.read(&mut data5)
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:50:9
|
|
|
|
|
LL | f.read(&mut data6)
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:81:5
|
|
|
|
|
LL | r.read(&mut data).await.unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:86:5
|
|
|
|
|
LL | r.read_exact(&mut data2).await.unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:93:5
|
|
|
|
|
LL | r.read(&mut data).await.unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:98:5
|
|
|
|
|
LL | r.read_exact(&mut data2).await.unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 10 previous errors
|
|
|