@@ -34,7 +34,7 @@ use crate::iter::{
34
34
} ;
35
35
use crate :: slice:: { MultiSliceArg , SliceArg } ;
36
36
use crate :: stacking:: concatenate;
37
- use crate :: { AxisSliceInfo , NdIndex , Slice } ;
37
+ use crate :: { NdIndex , Slice , SliceInfoElem } ;
38
38
39
39
/// # Methods For All Array Types
40
40
impl < A , S , D > ArrayBase < S , D >
@@ -415,7 +415,7 @@ where
415
415
let mut old_axis = 0 ;
416
416
let mut new_axis = 0 ;
417
417
info. as_ref ( ) . iter ( ) . for_each ( |& ax_info| match ax_info {
418
- AxisSliceInfo :: Slice { start, end, step } => {
418
+ SliceInfoElem :: Slice { start, end, step } => {
419
419
// Slice the axis in-place to update the `dim`, `strides`, and `ptr`.
420
420
self . slice_axis_inplace ( Axis ( old_axis) , Slice { start, end, step } ) ;
421
421
// Copy the sliced dim and stride to corresponding axis.
@@ -424,7 +424,7 @@ where
424
424
old_axis += 1 ;
425
425
new_axis += 1 ;
426
426
}
427
- AxisSliceInfo :: Index ( index) => {
427
+ SliceInfoElem :: Index ( index) => {
428
428
// Collapse the axis in-place to update the `ptr`.
429
429
let i_usize = abs_index ( self . len_of ( Axis ( old_axis) ) , index) ;
430
430
self . collapse_axis ( Axis ( old_axis) , i_usize) ;
@@ -434,7 +434,7 @@ where
434
434
// is zero length.
435
435
old_axis += 1 ;
436
436
}
437
- AxisSliceInfo :: NewAxis => {
437
+ SliceInfoElem :: NewAxis => {
438
438
// Set the dim and stride of the new axis.
439
439
new_dim[ new_axis] = 1 ;
440
440
new_strides[ new_axis] = 0 ;
@@ -465,7 +465,7 @@ where
465
465
///
466
466
/// - if an index is out of bounds
467
467
/// - 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
469
469
/// used in the [`s!`] macro
470
470
/// - if `D` is `IxDyn` and `info` does not match the number of array axes
471
471
pub fn slice_collapse < I > ( & mut self , info : I )
@@ -479,16 +479,16 @@ where
479
479
) ;
480
480
let mut axis = 0 ;
481
481
info. as_ref ( ) . iter ( ) . for_each ( |& ax_info| match ax_info {
482
- AxisSliceInfo :: Slice { start, end, step } => {
482
+ SliceInfoElem :: Slice { start, end, step } => {
483
483
self . slice_axis_inplace ( Axis ( axis) , Slice { start, end, step } ) ;
484
484
axis += 1 ;
485
485
}
486
- AxisSliceInfo :: Index ( index) => {
486
+ SliceInfoElem :: Index ( index) => {
487
487
let i_usize = abs_index ( self . len_of ( Axis ( axis) ) , index) ;
488
488
self . collapse_axis ( Axis ( axis) , i_usize) ;
489
489
axis += 1 ;
490
490
}
491
- AxisSliceInfo :: NewAxis => panic ! ( "`slice_collapse` does not support `NewAxis`." ) ,
491
+ SliceInfoElem :: NewAxis => panic ! ( "`slice_collapse` does not support `NewAxis`." ) ,
492
492
} ) ;
493
493
debug_assert_eq ! ( axis, self . ndim( ) ) ;
494
494
}
0 commit comments