I just discovered that if you write to a Linux fifo/pipe, you can miss data on the receiving end if you don't do a "flush" on a Writer. If I switched to a plain file--no data loss, but I had to add the "flush" call for the pipe to work reliably.
I think in general you don't have that guarantee for io::Write. For example, anything wrapped in BufWriter, even regular file, can be lazy and not get any writes until flush or drop of the writer.
On linux flushing std::fs::File is no-op. Dropping std::io::BufWritertries to flush its buffer but ignore the error if occurred. Are they the exact types you're using? For example tokio::io::BufWriter discards its buffer without flush as you can't .await during drop.