Skip to content

Commit db8ec89

Browse files
committed
Fix Clippy errors rust-ndarray#642
1 parent 8db15b1 commit db8ec89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dimension/dim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub struct Dim<I: ?Sized> {
4444
impl<I> Dim<I> {
4545
/// Private constructor and accessors for Dim
4646
pub(crate) fn new(index: I) -> Dim<I> {
47-
Dim { index: index }
47+
Dim { index }
4848
}
4949
#[inline(always)]
5050
pub(crate) fn ix(&self) -> &I {

src/dimension/dynindeximpl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ impl IxDyn {
221221
/// Create a new dimension value with `n` axes, all zeros
222222
#[inline]
223223
pub fn zeros(n: usize) -> IxDyn {
224-
const ZEROS: &'static [usize] = &[0; 4];
224+
const ZEROS: &[usize] = &[0; 4];
225225
if n <= ZEROS.len() {
226226
Dim(&ZEROS[..n])
227227
} else {

0 commit comments

Comments
 (0)