Skip to content
Snippets Groups Projects
Commit bed128b2 authored by Carl Lerche's avatar Carl Lerche
Browse files

Clarify when `BufMut::bytes_mut` can return &[]

Closes #79
parent 5a265cc8
No related branches found
No related tags found
No related merge requests found
......@@ -153,8 +153,10 @@ pub trait BufMut {
///
/// # Implementer notes
///
/// This function should never panic. Once the end of the buffer is reached,
/// i.e., `BufMut::remaining_mut` returns 0, calls to `bytes_mut` should
/// This function should never panic. `bytes_mut` should return an empty
/// slice **if and only if** `remaining_mut` returns 0. In other words,
/// `bytes_mut` returning an empty slice implies that `remaining_mut` will
/// return 0 and `remaining_mut` returning 0 implies that `bytes_mut` will
/// return an empty slice.
unsafe fn bytes_mut(&mut self) -> &mut [u8];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment