Currently, we keep increasing the slice pointer, and can run out of the inline space or try to realloc the non-inline space unncessarily. Simply set slices back to the start of the base_slices, when we know the length of the slice_buffer is 0. Note: This will change the behavior of undo_take_first(), if user tries to grow the slie_buffer, between take_first() and undo_take_first() calls. That said, it's not legal to add something to the buffer in between take_first() and undo_take_first(). So, we shouldn't have any issue.pull/18932/head
parent
929ca006ea
commit
b3fb277da6
1 changed files with 5 additions and 0 deletions
Loading…
Reference in new issue