File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -130,9 +130,8 @@ pub trait Dimension:
130
130
if self . slice ( ) . iter ( ) . all ( |& d| d != 0 ) {
131
131
let mut it = strides. slice_mut ( ) . iter_mut ( ) . rev ( ) ;
132
132
// Set first element to 1
133
- while let Some ( rs) = it. next ( ) {
133
+ if let Some ( rs) = it. next ( ) {
134
134
* rs = 1 ;
135
- break ;
136
135
}
137
136
let mut cum_prod = 1 ;
138
137
for ( rs, dim) in it. zip ( self . slice ( ) . iter ( ) . rev ( ) ) {
@@ -156,9 +155,8 @@ pub trait Dimension:
156
155
if self . slice ( ) . iter ( ) . all ( |& d| d != 0 ) {
157
156
let mut it = strides. slice_mut ( ) . iter_mut ( ) ;
158
157
// Set first element to 1
159
- while let Some ( rs) = it. next ( ) {
158
+ if let Some ( rs) = it. next ( ) {
160
159
* rs = 1 ;
161
- break ;
162
160
}
163
161
let mut cum_prod = 1 ;
164
162
for ( rs, dim) in it. zip ( self . slice ( ) ) {
You can’t perform that action at this time.
0 commit comments