diff --git a/src/common/src/array/iterator.rs b/src/common/src/array/iterator.rs index 5072903489a4b..c0d4e2361053a 100644 --- a/src/common/src/array/iterator.rs +++ b/src/common/src/array/iterator.rs @@ -34,7 +34,8 @@ impl<'a, A: Array> Iterator for ArrayIterator<'a, A> { if self.pos >= self.data.len() { None } else { - let item = self.data.value_at(self.pos); + // SAFETY: bounds check is done by `self.pos < self.data.len()`. + let item = unsafe { self.data.value_at_unchecked(self.pos) }; self.pos += 1; Some(item) }