bincode
bincode copied to clipboard
`peek_read` should be `&mut self`, not `&self`
I'm currently implementing Reader for a newtype over VecDeque.
To implement peek_read, I need to make the VecDeque contiguous with make_contiguous, which mutates in order to make the data a single contiguous slice.
I don't see any reason why peek_read should require being immutable, as every context I have seen it used in is followed by consume.
Would it be OK to change this in a PR?
👍 I see nothing wrong with peek_read taking &mut self