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 594c4a5 commit b766498Copy full SHA for b766498
src/dimension.rs
@@ -30,9 +30,8 @@ fn fastest_varying_order<D: Dimension>(strides: &D) -> D
30
for (ind, &val) in strides.slice().iter().enumerate() {
31
let sorted_ind = sorted.slice()
32
.iter()
33
- .enumerate()
34
- .find(|&(_, &x)| x == val)
35
- .unwrap().0; // cannot panic by construction
+ .position(|&x| x == val)
+ .unwrap(); // cannot panic by construction
36
res.slice_mut()[sorted_ind] = ind;
37
}
38
res
0 commit comments