Closed
Description
The documentation of BufMut::advance_mut
states the following about panics:
Panics
This function may panic if
cnt > self.remaining_mut()
.Implementer notes
It is recommended for implementations of
advance_mut
to panic if
cnt > self.remaining_mut()
. If the implementation does not panic,
the call must behave as ifcnt == self.remaining_mut()
.A call with
cnt == 0
should never panic and be a no-op.
Currently, the impl for Vec<u8>
will reserve to accommodate the advance. This seems to be in conflict with If the implementation does not panic, the call must behave as if cnt == self.remaining_mut().
Metadata
Metadata
Assignees
Labels
No labels