Skip to content

Commit f4769ff

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codec/flate/encoder.rs

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

@@ -100,7 +100,7 @@ impl Encode for FlateEncoder {
100100
)? {
101101
Status::Ok => Ok(false),
102102
Status::StreamEnd => Ok(true),
103-
Status::BufError => Err(io::Error::new(io::ErrorKind::Other, "unexpected BufError")),
103+
Status::BufError => Err(io::Error::other("unexpected BufError")),
104104
}
105105
}
106106
}

0 commit comments

Comments
 (0)