-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
refactor RangeArgument #39010
refactor RangeArgument #39010
Conversation
In @sfackler's last comment. The |
Bound::Included(&end) => end + 1, | ||
Bound::Excluded(&end) => end, | ||
Bound::Unbounded => self.len(), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the contract wrt to wrapping of the bounds arithmetic here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issue, containers can't be bigger than isize::max afaik
Bound::Included(&end) => end + 1, | ||
Bound::Excluded(&end) => end, | ||
Bound::Unbounded => len, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto re wrapping.
Indeed, it is covered by that, although the bound methods are named differently. |
implements #30877
supersedes #32681
r? @alexcrichton