Skip to content

Commit a760d6e

Browse files
committed
Rewrite Dimension::first_index in terms of zeros
1 parent 2d23a76 commit a760d6e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/dimension/dimension_trait.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,7 @@ pub trait Dimension : Clone + Eq + Debug + Send + Sync + Default +
166166
return None;
167167
}
168168
}
169-
let mut index = self.clone();
170-
for rr in index.slice_mut().iter_mut() {
171-
*rr = 0;
172-
}
173-
Some(index)
169+
Some(Self::zeros(self.ndim()))
174170
}
175171

176172
#[doc(hidden)]

0 commit comments

Comments
 (0)