mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 09:04:18 +00:00
clean tests/ui/unused_io_amount.rs
Cleaning the empty lines for clarity.
This commit is contained in:
parent
d0b932fb53
commit
fd3c001ec9
@ -15,19 +15,15 @@ fn try_macro<T: io::Read + io::Write>(s: &mut T) -> io::Result<()> {
|
||||
|
||||
fn question_mark<T: io::Read + io::Write>(s: &mut T) -> io::Result<()> {
|
||||
s.write(b"test")?;
|
||||
|
||||
let mut buf = [0u8; 4];
|
||||
s.read(&mut buf)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn unwrap<T: io::Read + io::Write>(s: &mut T) {
|
||||
s.write(b"test").unwrap();
|
||||
|
||||
let mut buf = [0u8; 4];
|
||||
s.read(&mut buf).unwrap();
|
||||
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -25,25 +25,25 @@ error: handle written amount returned or use `Write::write_all` instead
|
||||
= note: #[deny(unused_io_amount)] on by default
|
||||
|
||||
error: handle read amount returned or use `Read::read_exact` instead
|
||||
--> $DIR/unused_io_amount.rs:20:5
|
||||
--> $DIR/unused_io_amount.rs:19:5
|
||||
|
|
||||
20 | s.read(&mut buf)?;
|
||||
19 | s.read(&mut buf)?;
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(unused_io_amount)] on by default
|
||||
|
||||
error: handle written amount returned or use `Write::write_all` instead
|
||||
--> $DIR/unused_io_amount.rs:26:5
|
||||
--> $DIR/unused_io_amount.rs:24:5
|
||||
|
|
||||
26 | s.write(b"test").unwrap();
|
||||
24 | s.write(b"test").unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(unused_io_amount)] on by default
|
||||
|
||||
error: handle read amount returned or use `Read::read_exact` instead
|
||||
--> $DIR/unused_io_amount.rs:29:5
|
||||
--> $DIR/unused_io_amount.rs:26:5
|
||||
|
|
||||
29 | s.read(&mut buf).unwrap();
|
||||
26 | s.read(&mut buf).unwrap();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(unused_io_amount)] on by default
|
||||
|
Loading…
Reference in New Issue
Block a user