-
Notifications
You must be signed in to change notification settings - Fork 13.8k
add SliceIndex wrapper types Last and Clamp<Idx> #146260
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
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
17736fe
to
dda0188
Compare
This comment has been minimized.
This comment has been minimized.
dda0188
to
f847205
Compare
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
f847205
to
42bf2f8
Compare
@rustbot ready |
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.
Code looks good! Would you mind adding a couple tests (beyond the doctests) that ensure the behavior works as expected? It should afaict, but tests are always nice :)
library/core/src/slice/index.rs
Outdated
#[unstable(feature = "sliceindex_wrappers", issue = "146179")] | ||
impl Sealed for crate::index::Last {} | ||
#[unstable(feature = "sliceindex_wrappers", issue = "146179")] | ||
impl<T> Sealed for crate::index::Clamp<T> {} |
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.
impl<T> Sealed for crate::index::Clamp<T> {} | |
impl<T> Sealed for crate::index::Clamp<T> where T: Sealed {} |
to avoid potentially leaking an implementation detail down the road
5127f26
to
5381f1e
Compare
This comment has been minimized.
This comment has been minimized.
looks like https://auth.docker.io/token is 500ing, causing the CI to fail |
5381f1e
to
214e7b0
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
214e7b0
to
78d8ce7
Compare
Tracking issue: #146179