Result<W, IntoInnerError<BufWriter<W>>; it returns the error case if flushing the buffer fails.
IntoInnerError<W> has an
into_inner method, but this returns the original BufWriter. There is no API to get the inner writer out of a BufWriter if the flush fails, so I’m left with a choice between panicking or retry flushing indefinitely. At very least there should be some
force_into_inner method that ignores the flush failure.
IntoInnerError also only implements
Debug, which means you can’t unwrap the result returned by
BufWriter in a generic context unless you add a debug bound to your parameter; this seems less than ideal.