summaryrefslogtreecommitdiffstats
path: root/tokio/src/fs/file.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/fs/file.rs')
-rw-r--r--tokio/src/fs/file.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/tokio/src/fs/file.rs b/tokio/src/fs/file.rs
index 8b385117..7c71f483 100644
--- a/tokio/src/fs/file.rs
+++ b/tokio/src/fs/file.rs
@@ -682,9 +682,8 @@ impl AsyncWrite for File {
inner.poll_flush(cx)
}
- fn poll_shutdown(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<(), io::Error>> {
- // Flush is a noop for files so it's fine not to call it.
- Poll::Ready(Ok(()))
+ fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), io::Error>> {
+ self.poll_flush(cx)
}
}