Flushing the writer is a bad idea. Not only would I never expect `write!()` to explicitly flush my writer for me, but it's also just plain wasteful. For example, if I'm writing into a `BufferedWriter`, I definitely don't want it to be flushing the buffer after every unescaped string. You should just call `w.consume().map(|_| ())` here.

It also seems reasonable to expect `UnescapeWriter` to consume when it's dropped. You can't use that behavior here because you need to surface the `IoResult`, but other clients of `UnescapeWriter` will expect it (similar to how `BufferedWriter` flushes its buffer when it's dropped).

But I think `BufferedWriter` is actually behaving badly when it flushes its wrapped writer on drop. It's wrapped writer should be responsible for flushing itself on drop, and if the wrapped writer is a `RefWriter` then you may not want it to flush yet. Given that, you should implement `Drop` on `BufferedWriter` to call `consume()` but explicitly not flush its wrapped writer. You'll just want to ignore any error returned by `consume()`.

Something like

```rust
impl<'a, W: Writer> Drop for UnescapeWriter<'a, W> {
    fn drop(&mut self) {
        // FIXME(#12628): should this error be ignored?
        let _ = self.consume();
        // NB: We don't want to flush our inner writer. Someone else may still be using it
        // (via `RefWriter`). If it should be flushed, it can flush itself on `Drop`.
    }
}
```