From 674985d9fb87c866d9219297fde35b2e32b40b0b Mon Sep 17 00:00:00 2001 From: Kruno Tomola Fabro Date: Tue, 11 Aug 2020 20:51:02 +0200 Subject: [PATCH] fs: add comment explaing File flush is a no-op (#2761) Signed-off-by: Kruno Tomola Fabro --- tokio/src/fs/file.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tokio/src/fs/file.rs b/tokio/src/fs/file.rs index f3bc98546..c44196b3e 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> { + // Flush is a noop for files so it's fine not to call it. Poll::Ready(Ok(())) } }