kotlinx-io
kotlinx-io copied to clipboard
Correctly split head segment
Buffer's head/tail update after the split was incorrect (I'm not sure what I was thinking about when I changed it). It does not matter how many segments a buffer has, the split affects only a head one, so tail reference remains valid no matter what; thus only a head needs to be updated.