File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ pub unsafe trait Dimension : Clone + Eq + Debug + Send + Sync + Default +
113
113
{
114
114
let mut it = strides. slice_mut ( ) . iter_mut ( ) . rev ( ) ;
115
115
// Set first element to 1
116
- for rs in it. by_ref ( ) {
116
+ while let Some ( rs ) = it. next ( ) {
117
117
* rs = 1 ;
118
118
break ;
119
119
}
@@ -134,12 +134,12 @@ pub unsafe trait Dimension : Clone + Eq + Debug + Send + Sync + Default +
134
134
{
135
135
let mut it = strides. slice_mut ( ) . iter_mut ( ) ;
136
136
// Set first element to 1
137
- for rs in it. by_ref ( ) {
137
+ while let Some ( rs ) = it. next ( ) {
138
138
* rs = 1 ;
139
139
break ;
140
140
}
141
141
let mut cum_prod = 1 ;
142
- for ( rs, dim) in it. zip ( self . slice ( ) . iter ( ) ) {
142
+ for ( rs, dim) in it. zip ( self . slice ( ) ) {
143
143
cum_prod *= * dim;
144
144
* rs = cum_prod;
145
145
}
You can’t perform that action at this time.
0 commit comments