-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
ReadOnlySequence<T>.TryGet() returns empty result #27769
Comments
cc @ahsonkhan |
@ahsonkhan should we return false if empy segment is returned? |
Yes. If anyone would like to submit a fix for this with a test, that would be much appreciated. Otherwise, this issue will move to future. |
@ahsonkhan are we sure of this update?Seem a breaking changes there are a lot of tests that fail. Maybe before go on should be discussed on review?I mean it's a semantic changes. |
Aside from the
That's a good point. I am going to move it to future at this point given the impact of this issue doesn't seem quite that high to me, to make room for other 3.0 work. |
I had hoped that this would be changed for 3.0 as |
Yes, did simple update here with
Same result if only update public |
…ref position, out memory)".
…ref position, out memory)".
When calling
ReadOnlySequence<T>.TryGet(ref position, out memory)
with a position ofsequence.End
orsequence.GetPosition(size)
the result istrue
andmemory
is an empty slice. As this effectively is not returning a segment or byte, is should probably returnfalse
.As per this comment from @pakrym, I'm raising as a seperate issue.
The text was updated successfully, but these errors were encountered: