image
image copied to clipboard
`RowsMut`, `Rows`, `Pixels`, `PixelsMut` should implement accessor
RowsMut and Rows should implement accessor slices similar to the internal chunks.
Draft
impl<T> Rows<T> {
pub fn as_slice(&self) -> &[T::Subpixel];
}
I mistakenly assumed that slice::Chunks would have these methods similar to slice::Iter have them. However, that is not the case. Implementing this would therefore require us to store another reference to the complete slice or even harder for the mutable case. I'm marking this with dependency.
Seems not so popular and std hasn't added these implementations in 5 years. I'll leave it open as a reminder to do an ACP and PR to rustc but this will probably be closed.