fs: add comment explaing File flush is a no-op (#2761)

Signed-off-by: Kruno Tomola Fabro <[email protected]>
This commit is contained in:
Kruno Tomola Fabro
2020-08-11 11:51:02 -07:00
committed by GitHub
parent 77e6bb8d06
commit 674985d9fb
+1
View File
@@ -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(()))
}
}