Skip to content

Commit abdacc9

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codec/flate/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl Decode for FlateDecoder {
5151
match self.decode(input, output, FlushDecompress::None)? {
5252
Status::Ok => Ok(false),
5353
Status::StreamEnd => Ok(true),
54-
Status::BufError => Err(io::Error::new(io::ErrorKind::Other, "unexpected BufError")),
54+
Status::BufError => Err(io::Error::other("unexpected BufError")),
5555
}
5656
}
5757

@@ -91,7 +91,7 @@ impl Decode for FlateDecoder {
9191
)? {
9292
Status::Ok => Ok(false),
9393
Status::StreamEnd => Ok(true),
94-
Status::BufError => Err(io::Error::new(io::ErrorKind::Other, "unexpected BufError")),
94+
Status::BufError => Err(io::Error::other("unexpected BufError")),
9595
}
9696
}
9797
}

0 commit comments

Comments
 (0)