Skip to content

Conversation

Forostovec
Copy link
Contributor

The else-if branch checking s.offset == blockSize in Push was never reachable.
At the start of each Push, offset is effectively size % blockSize, so it cannot equal blockSize. Block rollover is already handled when size == capacity, wherea new block is allocated and offset is reset to 0. Removing the dead branch simplifies the logic and reduces code noise without changing behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant