File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -768,7 +768,7 @@ where
768
768
S : DataMut ,
769
769
I : NdIndex < D > ,
770
770
{
771
- unsafe { self . get_ptr_mut ( index) . map ( |ptr| & mut * ptr) }
771
+ unsafe { self . get_mut_ptr ( index) . map ( |ptr| & mut * ptr) }
772
772
}
773
773
774
774
/// Return a raw pointer to the element at `index`, or return `None`
@@ -780,15 +780,15 @@ where
780
780
/// let mut a = arr2(&[[1., 2.], [3., 4.]]);
781
781
///
782
782
/// let v = a.raw_view_mut();
783
- /// let p = a.get_ptr_mut ((0, 1)).unwrap();
783
+ /// let p = a.get_mut_ptr ((0, 1)).unwrap();
784
784
///
785
785
/// unsafe {
786
786
/// *p = 5.;
787
787
/// }
788
788
///
789
789
/// assert_eq!(a.get((0, 1)), Some(&5.));
790
790
/// ```
791
- pub fn get_ptr_mut < I > ( & mut self , index : I ) -> Option < * mut A >
791
+ pub fn get_mut_ptr < I > ( & mut self , index : I ) -> Option < * mut A >
792
792
where
793
793
S : RawDataMut ,
794
794
I : NdIndex < D > ,
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ where
164
164
fn index ( mut self , index : I ) -> & ' a mut A {
165
165
debug_bounds_check ! ( self , index) ;
166
166
unsafe {
167
- match self . get_ptr_mut ( index) {
167
+ match self . get_mut_ptr ( index) {
168
168
Some ( ptr) => & mut * ptr,
169
169
None => array_out_of_bounds ( ) ,
170
170
}
@@ -182,7 +182,7 @@ where
182
182
fn get ( mut self , index : I ) -> Option < & ' a mut A > {
183
183
debug_bounds_check ! ( self , index) ;
184
184
unsafe {
185
- match self . get_ptr_mut ( index) {
185
+ match self . get_mut_ptr ( index) {
186
186
Some ( ptr) => Some ( & mut * ptr) ,
187
187
None => None ,
188
188
}
You can’t perform that action at this time.
0 commit comments