diff options
author | Kruno Tomola Fabro <krunotf@gmail.com> | 2020-08-11 20:51:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 11:51:02 -0700 |
commit | 674985d9fb87c866d9219297fde35b2e32b40b0b (patch) | |
tree | a2594e4bdf4a14bfe5e632bf093bed0b9a85338e | |
parent | 77e6bb8d066a328cddbde250ad9f79aa2cd60a2d (diff) |
fs: add comment explaing File flush is a no-op (#2761)
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
-rw-r--r-- | tokio/src/fs/file.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tokio/src/fs/file.rs b/tokio/src/fs/file.rs index f3bc9854..c44196b3 100644 --- a/tokio/src/fs/file.rs +++ b/tokio/src/fs/file.rs @@ -757,6 +757,7 @@ impl AsyncWrite for File { } 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(())) } } |