| |
// In this case, the write could not complete. Leave `needs_flush` set
|
| |
// to be notified when the socket is ready to write again.
|
| |
Err(err)
|
| - |
if [
|
| - |
io::ErrorKind::WouldBlock,
|
| - |
io::ErrorKind::WriteZero,
|
| - |
io::ErrorKind::OutOfMemory,
|
| - |
io::ErrorKind::Interrupted,
|
| - |
]
|
| - |
.contains(&err.kind()) =>
|
| + |
if matches!(
|
| + |
err.kind(),
|
| + |
io::ErrorKind::WouldBlock
|
| + |
| io::ErrorKind::WriteZero
|
| + |
| io::ErrorKind::OutOfMemory
|
| + |
| io::ErrorKind::Interrupted
|
| + |
) =>
|
| |
{
|
| |
log::warn!(target: "transport", "Resource {} was not able to consume any data even though it has announced its write readiness", self.display());
|
| |
self.write_intent = true;
|