-
Notifications
You must be signed in to change notification settings - Fork 12.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
Move slice::check_range
to RangeBounds
#76885
Move slice::check_range
to RangeBounds
#76885
Conversation
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.
Naming for_length
looks non-intuitive but the movement looks good.
I don't like the name either. What do you think of |
Since this is doing bound checking, how about naming it |
|
@rust-highfive missed this PR, so randomly assigning to a libs member. |
@dylni I'm not a libs member. |
Sorry @joshtriplett. I was looking at this file. r? @KodrAus who reviewed the initial PR. |
@dylni Interesting, thanks for pointing me at that. :) |
Not a problem. :) It's good to know I'm looking in the right place |
📌 Commit f055b0b has been approved by |
⌛ Testing commit f055b0b with merge a19dde735bd9a7faeb838e2e786d8b5e884ddff1... |
💔 Test failed - checks-actions |
@bors retry |
@dylni: 🔑 Insufficient privileges: not in try users |
@bors retry |
⌛ Testing commit f055b0b with merge d04e136f6e752db206b94dfe266a9a5eeeb42424... |
💔 Test failed - checks-actions |
The failure still doesn't look related to this PR. |
@joshtriplett Can you retry bors again? |
@bors retry |
☀️ Test successful - checks-actions, checks-azure |
In 1.49 the slice::check_range unstable funciton got moved to RangeBounds::assert_len. rust-lang/rust#76885
Since this method doesn't take a slice anymore (#76662), it makes more sense to define it on
RangeBounds
.Questions:
assert_len
orassert_length
?