about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJuly Tikhonov <july.tikh@gmail.com>2023-09-05 19:46:18 +0300
committerGitHub <noreply@github.com>2023-09-05 19:46:18 +0300
commit71429f5fd2388ff6332889c193409a88c762e7c1 (patch)
tree9f4967be8157c49b60a1e77e33dfbb33a87cafb2
parentf222a2dd8f6391e6433f57a7c5f1514166edbec1 (diff)
downloadrust-71429f5fd2388ff6332889c193409a88c762e7c1.tar.gz
rust-71429f5fd2388ff6332889c193409a88c762e7c1.zip
fix a comment in std::iter::successors
The `unfold` function have since been renamed to `from_fn`.
-rw-r--r--library/core/src/iter/sources/successors.rs2
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 }
 }