Skip to content

Commit 798ba9f

Browse files
committed
Address review comments
1 parent dee5c03 commit 798ba9f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/raw/mod.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3850,9 +3850,10 @@ impl<T> RawIterRange<T> {
38503850
/// Folds every element into an accumulator by applying an operation,
38513851
/// returning the final result.
38523852
///
3853-
/// `fold_impl()` takes three arguments: a number of items in the table, an initial value,
3854-
/// and a closure with two arguments: an 'accumulator', and an element. The closure
3855-
/// returns the value that the accumulator should have for the next iteration.
3853+
/// `fold_impl()` takes three arguments: the number of items remaining in
3854+
/// the iterator, an initial value, and a closure with two arguments: an
3855+
/// 'accumulator', and an element. The closure returns the value that the
3856+
/// accumulator should have for the next iteration.
38563857
///
38573858
/// The initial value is the value the accumulator will have on the first call.
38583859
///
@@ -3877,10 +3878,6 @@ impl<T> RawIterRange<T> {
38773878
where
38783879
F: FnMut(B, Bucket<T>) -> B,
38793880
{
3880-
if n == 0 {
3881-
return acc;
3882-
}
3883-
38843881
loop {
38853882
while let Some(index) = self.current_group.next() {
38863883
// The returned `index` will always be in the range `0..Group::WIDTH`,

0 commit comments

Comments
 (0)