It might be useful to clarify the documentation to precise that it will not ever reallocate, and that by "growable" and "resizing" we really mean "flagging uninitialized data as initialized by using Vec::set_len, but not actually grow the Vec's allocation".
The
WriteBuf
documentation says:This seems to suggest that it would reallocate the buffer as necessary, which ended up causing a bug here: https://github.com/Ten0/serde_avro_fast/pull/11
It might be useful to clarify the documentation to precise that it will not ever reallocate, and that by "growable" and "resizing" we really mean "flagging uninitialized data as initialized by using
Vec::set_len
, but not actually grow the Vec's allocation".Thanks,