Skip to content

Commit

Permalink
update description of manual_repeat_n
Browse files Browse the repository at this point in the history
  • Loading branch information
lapla-cogito committed Jan 3, 2025
1 parent 5984be8 commit 91cc287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4319,7 +4319,7 @@ declare_clippy_lint! {
///
/// ### Why is this bad?
///
/// Using `repeat_n()` is more concise and clearer. Also, `repeat_n()` is sometimes faster than `repeat().take()` when the type of the element is non-trivial to clone.
/// Using `repeat_n()` is more concise and clearer. Also, `repeat_n()` is sometimes faster than `repeat().take()` when the type of the element is non-trivial to clone because the original value can be reused for the last `.next()` call rather than always cloning.
///
/// ### Example
/// ```no_run
Expand Down

0 comments on commit 91cc287

Please sign in to comment.