summaryrefslogtreecommitdiff
path: root/candle-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'candle-core/src')
-rw-r--r--candle-core/src/strided_index.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/candle-core/src/strided_index.rs b/candle-core/src/strided_index.rs
index 9354e8ea..92734b84 100644
--- a/candle-core/src/strided_index.rs
+++ b/candle-core/src/strided_index.rs
@@ -36,10 +36,7 @@ impl Iterator for StridedIndex<'_> {
type Item = usize;
fn next(&mut self) -> Option<Self::Item> {
- let storage_index = match self.next_storage_index {
- None => return None,
- Some(storage_index) => storage_index,
- };
+ let storage_index = self.next_storage_index?;
let mut updated = false;
let mut next_storage_index = storage_index;
for ((multi_i, max_i), stride_i) in self