Re: [PATCH 3/9] rust: block,core: rename `RawWriter` to `BufferWriter`
From: Miguel Ojeda
Date: Mon Jul 07 2025 - 14:25:52 EST
On Mon, Jul 7, 2025 at 4:58 PM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>
> The null insertion at the call site should be removed, it's a leftover
> from before `BufferWriter` handled that.
Just in case -- I think that if you do that then you would only get
the null terminator at the end of the buffer.
i.e. the one your formatter (`RawWriter`) places is really at the end
of the buffer, rather than immediately after your formatted text, so
if you don't have the one at the call site, you would end with garbage
in the middle unless the disk name fits perfectly into the buffer.
Cheers,
Miguel