mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 21:53:23 +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:17: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:21: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:25:5
|
|
|
|
|
LL | f.read_exact(&mut data3)?;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:29:5
|
|
|
|
|
LL | let _ = f.read(&mut data4)?;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:34:9
|
|
|
|
|
LL | f.read(&mut data5)
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:40:9
|
|
|
|
|
LL | f.read(&mut data6)
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:70:5
|
|
|
|
|
LL | r.read(&mut data).await.unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:74:5
|
|
|
|
|
LL | r.read_exact(&mut data2).await.unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:80:5
|
|
|
|
|
LL | r.read(&mut data).await.unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: reading zero byte data to `Vec`
|
|
--> $DIR/read_zero_byte_vec.rs:84:5
|
|
|
|
|
LL | r.read_exact(&mut data2).await.unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 10 previous errors
|
|
|