Skip to content

Commit 6149d57

Browse files
authored
Fix clippy error in xz2 decoder.rs
Signed-off-by: Jiahao XU <[email protected]>
1 parent 5da6467 commit 6149d57

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/codec/xz2/decoder.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Decode for Xz2Decoder {
4747
Status::Ok => Ok(false),
4848
Status::StreamEnd => Ok(true),
4949
Status::GetCheck => Err(io::Error::other(
50-
"Unexpected lzma integrity check"
50+
"Unexpected lzma integrity check",
5151
)),
5252
Status::MemNeeded => Err(io::Error::other("More memory needed")),
5353
}
@@ -76,11 +76,10 @@ impl Decode for Xz2Decoder {
7676
match status {
7777
Status::Ok => Ok(false),
7878
Status::StreamEnd => Ok(true),
79-
Status::GetCheck => Err(io::Error::new(
80-
io::ErrorKind::Other,
79+
Status::GetCheck => Err(io::Error::other(
8180
"Unexpected lzma integrity check",
8281
)),
83-
Status::MemNeeded => Err(io::Error::new(io::ErrorKind::Other, "More memory needed")),
82+
Status::MemNeeded => Err(io::Error::other("More memory needed")),
8483
}
8584
}
8685
}

0 commit comments

Comments
 (0)