Skip to content

Commit 63612a4

Browse files
blussjturner314
andauthored
API: Name and comment changes for remove_index
Co-authored-by: Jim Turner <[email protected]>
1 parent 8529bba commit 63612a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/impl_methods.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,15 +2449,15 @@ where
24492449
/// Decreases the length of `axis` by one.
24502450
///
24512451
/// ***Panics** if `axis` or `index` is out of bounds.
2452-
pub fn shift_remove_index(&mut self, axis: Axis, index: usize)
2452+
pub fn remove_index(&mut self, axis: Axis, index: usize)
24532453
where
24542454
S: DataOwned + DataMut,
24552455
{
2456-
// TODO: It's possible to choose to shift the elment to the front or the back here,
2456+
// TODO: It's possible to choose to shift the element to the front or the back here,
24572457
// whichever is closer.
24582458
let (_, mut tail) = self.view_mut().split_at(axis, index);
2459-
// shift elements to the back
2460-
// use swap to keep all elements initialized (as required by owned storage)
2459+
// shift elements to the front
2460+
// use swapping to keep all elements initialized (as required by owned storage)
24612461
Zip::from(tail.lanes_mut(axis)).for_each(|mut lane| {
24622462
let mut lane_iter = lane.iter_mut();
24632463
let mut dst = if let Some(dst) = lane_iter.next() { dst } else { return };

0 commit comments

Comments
 (0)