Skip to content

Commit 12059f9

Browse files
authored
Fix clippy error in gzip encoder.rs
Signed-off-by: Jiahao XU <[email protected]>
1 parent 3410595 commit 12059f9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/codec/xz2/encoder.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ impl Encode for Xz2Encoder {
4848

4949
match status {
5050
Status::Ok | Status::StreamEnd => Ok(()),
51-
Status::GetCheck => Err(io::Error::new(
52-
io::ErrorKind::Other,
53-
"Unexpected lzma integrity check",
51+
Status::GetCheck => Err(io::Error::other(
52+
"Unexpected lzma integrity check"
5453
)),
55-
Status::MemNeeded => Err(io::Error::new(io::ErrorKind::Other, "out of memory")),
54+
Status::MemNeeded => Err(io::Error::other("out of memory")),
5655
}
5756
}
5857

0 commit comments

Comments
 (0)