Skip to content

Commit 55740b2

Browse files
ShaharNavehyouknowone
authored andcommitted
Use any instead of loop
1 parent e03f762 commit 55740b2

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎vm/src/protocol/buffer.rs‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,7 @@ impl BufferDescriptor {
378378
}
379379

380380
pub fn is_zero_in_shape(&self) -> bool {
381-
for (shape, _, _) in self.dim_desc.iter().cloned() {
382-
if shape == 0 {
383-
return true;
384-
}
385-
}
386-
false
381+
self.dim_desc.iter().any(|(shape, _, _)| *shape == 0)
387382
}
388383

389384
// TODO: support fortain order

0 commit comments

Comments
 (0)