From 8c4796969c695be8751be6c96c3d7b0bdb54f1ed Mon Sep 17 00:00:00 2001 From: "Matthew D. Steele" Date: Sun, 7 Apr 2024 07:07:44 -0500 Subject: [PATCH] Fix clippy warning --- .github/workflows/tests.yml | 3 --- src/internal/stream.rs | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index abe931b..76f8165 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -30,7 +28,6 @@ jobs: linters: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 with: diff --git a/src/internal/stream.rs b/src/internal/stream.rs index 2e79151..2815620 100644 --- a/src/internal/stream.rs +++ b/src/internal/stream.rs @@ -130,10 +130,8 @@ impl BufRead for Stream { impl Read for Stream { fn read(&mut self, buf: &mut [u8]) -> io::Result { - 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) }