From 71429f5fd2388ff6332889c193409a88c762e7c1 Mon Sep 17 00:00:00 2001 From: July Tikhonov Date: Tue, 5 Sep 2023 19:46:18 +0300 Subject: [PATCH] fix a comment in std::iter::successors The `unfold` function have since been renamed to `from_fn`. --- library/core/src/iter/sources/successors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/iter/sources/successors.rs b/library/core/src/iter/sources/successors.rs index 6a6cbe905e464..7f7b2c7756628 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, { // If this function returned `impl Iterator` - // 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` type allows it to be `Clone` when `T` and `F` are. Successors { next: first, succ } }