Skip to content

Commit e4d68ef

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

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/futures/write/generic/encoder.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ impl<W: AsyncWrite, E: Encode> Encoder<W, E> {
8787
}
8888

8989
State::Finishing | State::Done => {
90-
return Poll::Ready(Err(io::Error::new(
91-
io::ErrorKind::Other,
90+
return Poll::Ready(Err(io::Error::other(
9291
"Write after close",
9392
)))
9493
}
@@ -114,8 +113,7 @@ impl<W: AsyncWrite, E: Encode> Encoder<W, E> {
114113
State::Encoding => this.encoder.flush(&mut output)?,
115114

116115
State::Finishing | State::Done => {
117-
return Poll::Ready(Err(io::Error::new(
118-
io::ErrorKind::Other,
116+
return Poll::Ready(Err(io::Error::other(
119117
"Flush after close",
120118
)))
121119
}

0 commit comments

Comments
 (0)