Skip to content

Commit d2b203e

Browse files
committed
fix(clippy): remove unnecessary derefs
1 parent b1441d5 commit d2b203e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/dimension/dynindeximpl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl<T> Deref for IxDynRepr<T> {
2121
debug_assert!(len as usize <= ar.len());
2222
unsafe { ar.get_unchecked(..len as usize) }
2323
}
24-
IxDynRepr::Alloc(ref ar) => &*ar,
24+
IxDynRepr::Alloc(ref ar) => ar,
2525
}
2626
}
2727
}
@@ -33,7 +33,7 @@ impl<T> DerefMut for IxDynRepr<T> {
3333
debug_assert!(len as usize <= ar.len());
3434
unsafe { ar.get_unchecked_mut(..len as usize) }
3535
}
36-
IxDynRepr::Alloc(ref mut ar) => &mut *ar,
36+
IxDynRepr::Alloc(ref mut ar) => ar,
3737
}
3838
}
3939
}

src/dimension/ndindex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ unsafe impl<'a> NdIndex<IxDyn> for &'a IxDyn {
216216

217217
unsafe impl<'a> NdIndex<IxDyn> for &'a [Ix] {
218218
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize> {
219-
stride_offset_checked(dim.ix(), strides.ix(), *self)
219+
stride_offset_checked(dim.ix(), strides.ix(), self)
220220
}
221221
fn index_unchecked(&self, strides: &IxDyn) -> isize {
222222
zip(strides.ix(), *self)

0 commit comments

Comments
 (0)