diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-28 11:11:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-28 11:11:08 +0200 |
| commit | b405aa2d0301c5fc448299501278ae2db4e15e50 (patch) | |
| tree | 25f749e1f7d4c446983d7e3dd9b16eb0bf4b8dab /src/libstd/io | |
| parent | 2826bdcfa6fecc656294534162fb5990d3d53cf5 (diff) | |
| parent | 124f6ef7cdea1083b0cbe0371e3f7fbe1152a9d1 (diff) | |
| download | rust-b405aa2d0301c5fc448299501278ae2db4e15e50.tar.gz rust-b405aa2d0301c5fc448299501278ae2db4e15e50.zip | |
Rollup merge of #62806 - mati865:clippy, r=TimNN
Fix few Clippy warnings
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index e951b575773..09b6b694f7b 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -1923,7 +1923,7 @@ impl<T: Read, U: Read> Read for Chain<T, U> { fn read(&mut self, buf: &mut [u8]) -> Result<usize> { if !self.done_first { match self.first.read(buf)? { - 0 if buf.len() != 0 => self.done_first = true, + 0 if !buf.is_empty() => self.done_first = true, n => return Ok(n), } } @@ -1955,7 +1955,7 @@ impl<T: BufRead, U: BufRead> BufRead for Chain<T, U> { fn fill_buf(&mut self) -> Result<&[u8]> { if !self.done_first { match self.first.fill_buf()? { - buf if buf.len() == 0 => { self.done_first = true; } + buf if buf.is_empty() => { self.done_first = true; } buf => return Ok(buf), } } |
