-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trait DisjointMutIndex
: Add an impl
for `(RangeFrom<usize>, Range…
…To<usize>)` for `[start..][..len]` bounds (#988) A majority of our slice ranges are of the form `[start..][..len]`. This is easy to express with normal slices where we can do the slicing multiple times, but with `DisjointMut`, that's harder, so this adds support for `.index((start.., ..len))` to achieve the same. It's not as clear what it means initially, but we use this idiom so much I think it might be worth it for clarity through brevity.
- Loading branch information
Showing
1 changed file
with
19 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters