-
Notifications
You must be signed in to change notification settings - Fork 306
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
Add multi_slice_* methods (supports flat tuples only) #717
Add multi_slice_* methods (supports flat tuples only) #717
Conversation
1e626f8
to
b5da8e0
Compare
22274f6
to
601c1bf
Compare
/// [`.multi_slice_move()`]. | ||
/// | ||
/// [`.multi_slice_mut()`]: #method.multi_slice_mut | ||
/// [`.multi_slice_move()`]: type.ArrayViewMut.html#method.multi_slice_move |
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.
I don't know about you, but I don't mind transitioning to nightly-only rustdoc links (because they render correctly in docs.rs).. Importance of rendering the links when the user generates docs on stable?
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.
That would be fine, although I'm having trouble getting nightly-style links to work correctly. The following don't work:
[`.multi_slice_mut()`]
[`multi_slice_mut()`]
If I add an explicit destination, multi_slice_mut
works fine, but I'm not sure how to make multi_slice_move
work:
This works:
[`.multi_slice_mut()`]
[`.multi_slice_mut()`]: ArrayBase::multi_slice_mut()
This doesn't:
[`.multi_slice_move()`]
[`.multi_slice_move()`]: ArrayViewMut::multi_slice_move()
46914be
to
ef93420
Compare
Thanks for reviewing this, @bluss. After your approval, I fixed a minor issue in the docs, added more tests, rebased on the latest |
Great, now we have reason to go for 0.13.1 soon and I can manage the release. I expect the work after that to be for 0.13.2, further non-breaks. |
I'm sorry that I haven't been around to manage 0.13.1, but it would be ok if others had. That said, maybe I can do it now. |
This is an alternative implementation of #716 that supports only flat tuples of slicing information. This means that it's no longer possible to perform arbitrarily many slices in a single call. The implementations are also limited only to the cases
(SliceInfo, SliceInfo, ...)
and(&SliceInfo, &SliceInfo, ...)
, so slicing with e.g.(SliceInfo, &SliceInfo, ...)
is not supported.Despite the fact that the trait implementations are more limited than #716, I prefer this version because the implementation is simpler, it's easier to understand, and the unsafe code is more contained.
The implementation is done, but the tests need improvement.
Fixes #687. Closes #716.