@@ -34,7 +34,7 @@ use crate::iter::{
3434} ;
3535use crate :: slice:: { MultiSliceArg , SliceArg } ;
3636use crate :: stacking:: concatenate;
37- use crate :: { AxisSliceInfo , NdIndex , Slice } ;
37+ use crate :: { NdIndex , Slice , SliceInfoElem } ;
3838
3939/// # Methods For All Array Types
4040impl < A , S , D > ArrayBase < S , D >
@@ -415,7 +415,7 @@ where
415415 let mut old_axis = 0 ;
416416 let mut new_axis = 0 ;
417417 info. as_ref ( ) . iter ( ) . for_each ( |& ax_info| match ax_info {
418- AxisSliceInfo :: Slice { start, end, step } => {
418+ SliceInfoElem :: Slice { start, end, step } => {
419419 // Slice the axis in-place to update the `dim`, `strides`, and `ptr`.
420420 self . slice_axis_inplace ( Axis ( old_axis) , Slice { start, end, step } ) ;
421421 // Copy the sliced dim and stride to corresponding axis.
@@ -424,7 +424,7 @@ where
424424 old_axis += 1 ;
425425 new_axis += 1 ;
426426 }
427- AxisSliceInfo :: Index ( index) => {
427+ SliceInfoElem :: Index ( index) => {
428428 // Collapse the axis in-place to update the `ptr`.
429429 let i_usize = abs_index ( self . len_of ( Axis ( old_axis) ) , index) ;
430430 self . collapse_axis ( Axis ( old_axis) , i_usize) ;
@@ -434,7 +434,7 @@ where
434434 // is zero length.
435435 old_axis += 1 ;
436436 }
437- AxisSliceInfo :: NewAxis => {
437+ SliceInfoElem :: NewAxis => {
438438 // Set the dim and stride of the new axis.
439439 new_dim[ new_axis] = 1 ;
440440 new_strides[ new_axis] = 0 ;
@@ -465,7 +465,7 @@ where
465465 ///
466466 /// - if an index is out of bounds
467467 /// - if a step size is zero
468- /// - if [`AxisSliceInfo ::NewAxis`] is in `info`, e.g. if [`NewAxis`] was
468+ /// - if [`SliceInfoElem ::NewAxis`] is in `info`, e.g. if [`NewAxis`] was
469469 /// used in the [`s!`] macro
470470 /// - if `D` is `IxDyn` and `info` does not match the number of array axes
471471 pub fn slice_collapse < I > ( & mut self , info : I )
@@ -479,16 +479,16 @@ where
479479 ) ;
480480 let mut axis = 0 ;
481481 info. as_ref ( ) . iter ( ) . for_each ( |& ax_info| match ax_info {
482- AxisSliceInfo :: Slice { start, end, step } => {
482+ SliceInfoElem :: Slice { start, end, step } => {
483483 self . slice_axis_inplace ( Axis ( axis) , Slice { start, end, step } ) ;
484484 axis += 1 ;
485485 }
486- AxisSliceInfo :: Index ( index) => {
486+ SliceInfoElem :: Index ( index) => {
487487 let i_usize = abs_index ( self . len_of ( Axis ( axis) ) , index) ;
488488 self . collapse_axis ( Axis ( axis) , i_usize) ;
489489 axis += 1 ;
490490 }
491- AxisSliceInfo :: NewAxis => panic ! ( "`slice_collapse` does not support `NewAxis`." ) ,
491+ SliceInfoElem :: NewAxis => panic ! ( "`slice_collapse` does not support `NewAxis`." ) ,
492492 } ) ;
493493 debug_assert_eq ! ( axis, self . ndim( ) ) ;
494494 }
0 commit comments