Skip to content

Commit 4882199

Browse files
authored
Fix clippy error in tokio generic encoder.rs
Signed-off-by: Jiahao XU <[email protected]>
1 parent dc239cb commit 4882199

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/tokio/write/generic/encoder.rs

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

9898
State::Finishing | State::Done => {
99-
return Poll::Ready(Err(io::Error::new(
100-
io::ErrorKind::Other,
99+
return Poll::Ready(Err(io::Error::other(
101100
"Write after shutdown",
102101
)))
103102
}
@@ -123,8 +122,7 @@ impl<W: AsyncWrite, E: Encode> Encoder<W, E> {
123122
State::Encoding | State::Flushing => this.encoder.flush(&mut output)?,
124123

125124
State::Finishing | State::Done => {
126-
return Poll::Ready(Err(io::Error::new(
127-
io::ErrorKind::Other,
125+
return Poll::Ready(Err(io::Error::other(
128126
"Flush after shutdown",
129127
)))
130128
}

0 commit comments

Comments
 (0)