diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-10-06 13:18:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-06 13:18:34 +0200 |
| commit | 382701e6b6c4b65b5f4a00d6092cf8cef91f1181 (patch) | |
| tree | 78af0c1986e397159bd955cd47f281c10586e743 | |
| parent | 525c661842b5fd6be5b191a4f6baa2c79d722e36 (diff) | |
| parent | 71429f5fd2388ff6332889c193409a88c762e7c1 (diff) | |
| download | rust-382701e6b6c4b65b5f4a00d6092cf8cef91f1181.tar.gz rust-382701e6b6c4b65b5f4a00d6092cf8cef91f1181.zip | |
Rollup merge of #115588 - tifv:fix-comment-successors, r=scottmcm
Fix a comment in std::iter::successors The `unfold` function have since #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 :upside_down_face: deleting these three lines is a perfectly fine alternative, in my opinion.)
| -rw-r--r-- | library/core/src/iter/sources/successors.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/iter/sources/successors.rs b/library/core/src/iter/sources/successors.rs index 6a6cbe905e4..7f7b2c77566 100644 --- a/library/core/src/iter/sources/successors.rs +++ b/library/core/src/iter/sources/successors.rs @@ -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 } } |
