We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8db15b1 commit db8ec89Copy full SHA for db8ec89
src/dimension/dim.rs
@@ -44,7 +44,7 @@ pub struct Dim<I: ?Sized> {
44
impl<I> Dim<I> {
45
/// Private constructor and accessors for Dim
46
pub(crate) fn new(index: I) -> Dim<I> {
47
- Dim { index: index }
+ Dim { index }
48
}
49
#[inline(always)]
50
pub(crate) fn ix(&self) -> &I {
src/dimension/dynindeximpl.rs
@@ -221,7 +221,7 @@ impl IxDyn {
221
/// Create a new dimension value with `n` axes, all zeros
222
#[inline]
223
pub fn zeros(n: usize) -> IxDyn {
224
- const ZEROS: &'static [usize] = &[0; 4];
+ const ZEROS: &[usize] = &[0; 4];
225
if n <= ZEROS.len() {
226
Dim(&ZEROS[..n])
227
} else {
0 commit comments