File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -3850,9 +3850,10 @@ impl<T> RawIterRange<T> {
3850
3850
/// Folds every element into an accumulator by applying an operation,
3851
3851
/// returning the final result.
3852
3852
///
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.
3856
3857
///
3857
3858
/// The initial value is the value the accumulator will have on the first call.
3858
3859
///
@@ -3877,10 +3878,6 @@ impl<T> RawIterRange<T> {
3877
3878
where
3878
3879
F : FnMut ( B , Bucket < T > ) -> B ,
3879
3880
{
3880
- if n == 0 {
3881
- return acc;
3882
- }
3883
-
3884
3881
loop {
3885
3882
while let Some ( index) = self . current_group . next ( ) {
3886
3883
// The returned `index` will always be in the range `0..Group::WIDTH`,
You can’t perform that action at this time.
0 commit comments