-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: BytesStream failing to set correct slice range #1201
Fix: BytesStream failing to set correct slice range #1201
Conversation
Ah. Looks like the failures are because of new clippy version. Not because of my changes. Should I create a separate PR to fix that? |
#1203 should have already addressed the clippy issues. Can you rebase to the latest |
I'm curious what the impact is and how we get unit tests on it. |
Fix looks good to me. |
@dmweis I've written a few unit tests to provide some coverage of these functions (and which fail with the unmodified code/work with your fix). Are you happy for me to push these to your branch? |
Oh! That would be amazing! Please go ahead! And my appologieze. I should have written tests. I forgot about this PR. Happy to do any more work if there is anything else you'd like changed? |
@microsoft-github-policy-service agree |
BytesStream
calls Bytes::slice with incorrect range ofSTART..SIZE
. Range should beSTART..END
.This results in incorrect slicing or even an assert failure of
"range start must not be greater than end:
coming from the slice methnod.I wanted to add a test for this but don't see any tests for this code. If there are some I am happy to add a test for this case.
Tested locally from my fork