Skip to content

Commit c6f64b2

Browse files
jturner314bluss
authored andcommitted
Rename MultiSlice to MultiSliceArg
1 parent f9ddada commit c6f64b2

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

src/impl_methods.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use crate::iter::{
3232
AxisChunksIter, AxisChunksIterMut, AxisIter, AxisIterMut, ExactChunks, ExactChunksMut,
3333
IndexedIter, IndexedIterMut, Iter, IterMut, Lanes, LanesMut, Windows,
3434
};
35-
use crate::slice::{MultiSlice, SliceArg};
35+
use crate::slice::{MultiSliceArg, SliceArg};
3636
use crate::stacking::concatenate;
3737
use crate::{AxisSliceInfo, NdIndex, Slice};
3838

@@ -363,8 +363,9 @@ where
363363

364364
/// Return multiple disjoint, sliced, mutable views of the array.
365365
///
366-
/// See [*Slicing*](#slicing) for full documentation.
367-
/// See also [`s!`], [`SliceArg`], and [`SliceInfo`](crate::SliceInfo).
366+
/// See [*Slicing*](#slicing) for full documentation. See also
367+
/// [`MultiSliceArg`], [`s!`], [`SliceArg`], and
368+
/// [`SliceInfo`](crate::SliceInfo).
368369
///
369370
/// **Panics** if any of the following occur:
370371
///
@@ -385,7 +386,7 @@ where
385386
/// ```
386387
pub fn multi_slice_mut<'a, M>(&'a mut self, info: M) -> M::Output
387388
where
388-
M: MultiSlice<'a, A, D>,
389+
M: MultiSliceArg<'a, A, D>,
389390
S: DataMut,
390391
{
391392
info.multi_slice_move(self.view_mut())

src/impl_views/splitting.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// except according to those terms.
88

99
use crate::imp_prelude::*;
10-
use crate::slice::MultiSlice;
10+
use crate::slice::MultiSliceArg;
1111

1212
/// Methods for read-only array views.
1313
impl<'a, A, D> ArrayView<'a, A, D>
@@ -117,8 +117,9 @@ where
117117
/// consumes `self` and produces views with lifetimes matching that of
118118
/// `self`.
119119
///
120-
/// See [*Slicing*](#slicing) for full documentation. See also [`s!`],
121-
/// [`SliceArg`](crate::SliceArg), and [`SliceInfo`](crate::SliceInfo).
120+
/// See [*Slicing*](#slicing) for full documentation. See also
121+
/// [`MultiSliceArg`], [`s!`], [`SliceArg`](crate::SliceArg), and
122+
/// [`SliceInfo`](crate::SliceInfo).
122123
///
123124
/// [`.multi_slice_mut()`]: struct.ArrayBase.html#method.multi_slice_mut
124125
///
@@ -129,7 +130,7 @@ where
129130
/// * if `D` is `IxDyn` and `info` does not match the number of array axes
130131
pub fn multi_slice_move<M>(self, info: M) -> M::Output
131132
where
132-
M: MultiSlice<'a, A, D>,
133+
M: MultiSliceArg<'a, A, D>,
133134
{
134135
info.multi_slice_move(self)
135136
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub use crate::dimension::NdIndex;
142142
pub use crate::error::{ErrorKind, ShapeError};
143143
pub use crate::indexes::{indices, indices_of};
144144
pub use crate::slice::{
145-
AxisSliceInfo, MultiSlice, NewAxis, Slice, SliceArg, SliceInfo, SliceNextDim,
145+
AxisSliceInfo, MultiSliceArg, NewAxis, Slice, SliceArg, SliceInfo, SliceNextDim,
146146
};
147147

148148
use crate::iterators::Baseiter;

src/slice.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ macro_rules! s(
904904
///
905905
/// It's unfortunate that we need `'a` and `A` to be parameters of the trait,
906906
/// but they're necessary until Rust supports generic associated types.
907-
pub trait MultiSlice<'a, A, D>
907+
pub trait MultiSliceArg<'a, A, D>
908908
where
909909
A: 'a,
910910
D: Dimension,
@@ -921,7 +921,7 @@ where
921921
private_decl! {}
922922
}
923923

924-
impl<'a, A, D> MultiSlice<'a, A, D> for ()
924+
impl<'a, A, D> MultiSliceArg<'a, A, D> for ()
925925
where
926926
A: 'a,
927927
D: Dimension,
@@ -933,7 +933,7 @@ where
933933
private_impl! {}
934934
}
935935

936-
impl<'a, A, D, I0> MultiSlice<'a, A, D> for (&I0,)
936+
impl<'a, A, D, I0> MultiSliceArg<'a, A, D> for (&I0,)
937937
where
938938
A: 'a,
939939
D: Dimension,
@@ -953,7 +953,7 @@ macro_rules! impl_multislice_tuple {
953953
impl_multislice_tuple!(@def_impl ($($but_last,)* $last,), [$($but_last)*] $last);
954954
};
955955
(@def_impl ($($all:ident,)*), [$($but_last:ident)*] $last:ident) => {
956-
impl<'a, A, D, $($all,)*> MultiSlice<'a, A, D> for ($(&$all,)*)
956+
impl<'a, A, D, $($all,)*> MultiSliceArg<'a, A, D> for ($(&$all,)*)
957957
where
958958
A: 'a,
959959
D: Dimension,
@@ -995,11 +995,11 @@ impl_multislice_tuple!([I0 I1 I2] I3);
995995
impl_multislice_tuple!([I0 I1 I2 I3] I4);
996996
impl_multislice_tuple!([I0 I1 I2 I3 I4] I5);
997997

998-
impl<'a, A, D, T> MultiSlice<'a, A, D> for &T
998+
impl<'a, A, D, T> MultiSliceArg<'a, A, D> for &T
999999
where
10001000
A: 'a,
10011001
D: Dimension,
1002-
T: MultiSlice<'a, A, D>,
1002+
T: MultiSliceArg<'a, A, D>,
10031003
{
10041004
type Output = T::Output;
10051005

0 commit comments

Comments
 (0)