Skip to content

Commit c175b91

Browse files
authored
Fix clippy error in future write generic decoder.rs
Signed-off-by: Jiahao XU <[email protected]>
1 parent 4882199 commit c175b91

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/futures/write/generic/decoder.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ impl<W: AsyncWrite, D: Decode> Decoder<W, D> {
8888
}
8989

9090
State::Done => {
91-
return Poll::Ready(Err(io::Error::new(
92-
io::ErrorKind::Other,
91+
return Poll::Ready(Err(io::Error::other(
9392
"Write after end of stream",
9493
)))
9594
}
@@ -179,8 +178,7 @@ impl<W: AsyncWrite, D: Decode> AsyncWrite for Decoder<W, D> {
179178
ready!(self.as_mut().project().writer.as_mut().poll_close(cx))?;
180179
Poll::Ready(Ok(()))
181180
} else {
182-
Poll::Ready(Err(io::Error::new(
183-
io::ErrorKind::Other,
181+
Poll::Ready(Err(io::Error::other(
184182
"Attempt to close before finishing input",
185183
)))
186184
}

0 commit comments

Comments
 (0)