mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-08 13:02:50 +00:00
fix a comment in std::iter::successors
The `unfold` function have since been renamed to `from_fn`.
This commit is contained in:
parent
f222a2dd8f
commit
71429f5fd2
@ -17,7 +17,7 @@ where
|
||||
F: FnMut(&T) -> Option<T>,
|
||||
{
|
||||
// If this function returned `impl Iterator<Item=T>`
|
||||
// it could be based on `unfold` and not need a dedicated type.
|
||||
// it could be based on `from_fn` and not need a dedicated type.
|
||||
// However having a named `Successors<T, F>` type allows it to be `Clone` when `T` and `F` are.
|
||||
Successors { next: first, succ }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user