Skip to content

Commit

Permalink
clean tests/ui/unused_io_amount.rs
Browse files Browse the repository at this point in the history
Cleaning the empty lines for clarity.
  • Loading branch information
luisbg committed May 11, 2017
1 parent d0b932f commit fd3c001
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions tests/ui/unused_io_amount.rs
Expand Up @@ -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() {
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/unused_io_amount.stderr
Expand Up @@ -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
Expand Down

0 comments on commit fd3c001

Please sign in to comment.