Skip to content

Commit 7e6da26

Browse files
authored
Fix clippy error in bzip2 decoder.rs
Signed-off-by: Jiahao XU <[email protected]>
1 parent 5c6b3c0 commit 7e6da26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codec/bzip2/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl BzDecoder {
3636
let status = self
3737
.decompress
3838
.decompress(input.unwritten(), output.unwritten_mut())
39-
.map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;
39+
.map_err(|e| io::Error::other(e))?;
4040

4141
input.advance((self.decompress.total_in() - prior_in) as usize);
4242
output.advance((self.decompress.total_out() - prior_out) as usize);
@@ -74,7 +74,7 @@ impl Decode for BzDecoder {
7474

7575
// There was insufficient memory in the input or output buffer to complete
7676
// the request, but otherwise everything went normally.
77-
Status::MemNeeded => Err(io::Error::new(io::ErrorKind::Other, "out of memory")),
77+
Status::MemNeeded => Err(io::Error::other("out of memory")),
7878
}
7979
}
8080

0 commit comments

Comments
 (0)