File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 3131
3232 /// Return the array’s data as a slice, if it is contiguous and in standard order.
3333 /// Return `None` otherwise.
34+ ///
35+ /// Note that while the method is similar to [`ArrayBase::as_slice()`], this method tranfers
36+ /// the view's lifetime to the slice, so it is a bit more powerful.
3437 #[ allow( clippy:: wrong_self_convention) ]
3538 pub fn into_slice ( & self ) -> Option < & ' a [ A ] > {
3639 if self . is_standard_layout ( ) {
@@ -116,6 +119,9 @@ where
116119{
117120 /// Return the array’s data as a slice, if it is contiguous and in standard order.
118121 /// Return `None` otherwise.
122+ ///
123+ /// Note that while this is similar to [`ArrayBase::as_slice_mut()`], this method tranfers the
124+ /// view's lifetime to the slice.
119125 pub fn into_slice ( self ) -> Option < & ' a mut [ A ] > {
120126 self . into_slice_ ( ) . ok ( )
121127 }
You can’t perform that action at this time.
0 commit comments