Skip to content

Commit ea56916

Browse files
authored
Unrolled build for rust-lang#115588
Rollup merge of rust-lang#115588 - tifv:fix-comment-successors, r=scottmcm Fix a comment in std::iter::successors The `unfold` function have since rust-lang#58062 been renamed to `from_fn`. (I'm not sure if this whole comment is still useful—it's not like there are many iterators that *can't* be based on `from_fn`. Anyway, in its current form this comment is not correct, and it sent me into a half-hour research of what happened to `unfold` function, so I want to do *something* with it 🙃 deleting these three lines is a perfectly fine alternative, in my opinion.)
2 parents 6683f13 + 71429f5 commit ea56916

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: library/core/src/iter/sources/successors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ where
1717
F: FnMut(&T) -> Option<T>,
1818
{
1919
// If this function returned `impl Iterator<Item=T>`
20-
// it could be based on `unfold` and not need a dedicated type.
20+
// it could be based on `from_fn` and not need a dedicated type.
2121
// However having a named `Successors<T, F>` type allows it to be `Clone` when `T` and `F` are.
2222
Successors { next: first, succ }
2323
}

0 commit comments

Comments
 (0)