If we end up removing Seek from MemWriter as suggested in #15915, there's not much reason left to having an explicit MemWriter. Instead, we could directly implement Writer on Vec<u8>. Likewise, we could do the same with BufWriter/BufReader and &[u8] if we take advantage of the fact that neither of them return the slice, so they can shrink the slice as it is read or written to.
If we end up removing
SeekfromMemWriteras suggested in #15915, there's not much reason left to having an explicitMemWriter. Instead, we could directly implementWriteronVec<u8>. Likewise, we could do the same withBufWriter/BufReaderand&[u8]if we take advantage of the fact that neither of them return the slice, so they can shrink the slice as it is read or written to.