Skip to content

Commit 6f27001

Browse files
committed
Fix example code
1 parent 91a94cf commit 6f27001

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/trivial_map_over_range.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare_clippy_lint! {
2424
/// ```
2525
/// Use instead:
2626
/// ```no_run
27-
/// let f : Vec<_> = std::iter::from_fn(|| { 3 + 1 }).take(10).collect();
27+
/// let f : Vec<_> = std::iter::repeat_with(|| { 3 + 1 }).take(10).collect();
2828
/// ```
2929
#[clippy::version = "1.81.0"]
3030
pub TRIVIAL_MAP_OVER_RANGE,

0 commit comments

Comments
 (0)