Skip to content

Commit

Permalink
Fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Apr 7, 2024
1 parent 20abf31 commit 8c47969
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest]
rust: [ stable ]

needs: [linters]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -30,7 +28,6 @@ jobs:

linters:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
Expand Down
6 changes: 2 additions & 4 deletions src/internal/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ impl<F: Read + Seek> BufRead for Stream<F> {

impl<F: Read + Seek> Read for Stream<F> {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
let num_bytes = {
let mut buffered_data = self.fill_buf()?;
buffered_data.read(buf)?
};
let mut buffered_data = self.fill_buf()?;
let num_bytes = buffered_data.read(buf)?;
self.consume(num_bytes);
Ok(num_bytes)
}
Expand Down

0 comments on commit 8c47969

Please sign in to comment.