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 31
31
32
32
/// Return the array’s data as a slice, if it is contiguous and in standard order.
33
33
/// 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.
34
37
#[ allow( clippy:: wrong_self_convention) ]
35
38
pub fn into_slice ( & self ) -> Option < & ' a [ A ] > {
36
39
if self . is_standard_layout ( ) {
@@ -116,6 +119,9 @@ where
116
119
{
117
120
/// Return the array’s data as a slice, if it is contiguous and in standard order.
118
121
/// 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.
119
125
pub fn into_slice ( self ) -> Option < & ' a mut [ A ] > {
120
126
self . into_slice_ ( ) . ok ( )
121
127
}
You can’t perform that action at this time.
0 commit comments