Skip to content

Commit 71ead80

Browse files
authored
Fix fmt in tokio generics write encoder.rs
Signed-off-by: Jiahao XU <[email protected]>
1 parent a5059d7 commit 71ead80

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/tokio/write/generic/encoder.rs

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

9898
State::Finishing | State::Done => {
99-
return Poll::Ready(Err(io::Error::other(
100-
"Write after shutdown",
101-
)))
99+
return Poll::Ready(Err(io::Error::other("Write after shutdown")))
102100
}
103101
};
104102

@@ -122,9 +120,7 @@ impl<W: AsyncWrite, E: Encode> Encoder<W, E> {
122120
State::Encoding | State::Flushing => this.encoder.flush(&mut output)?,
123121

124122
State::Finishing | State::Done => {
125-
return Poll::Ready(Err(io::Error::other(
126-
"Flush after shutdown",
127-
)))
123+
return Poll::Ready(Err(io::Error::other("Flush after shutdown")))
128124
}
129125
};
130126
*this.state = State::Flushing;

0 commit comments

Comments
 (0)