From 91cc28795ccf5ec594e8abb13d59397dc1dcec4f Mon Sep 17 00:00:00 2001 From: lapla-cogito Date: Fri, 3 Jan 2025 13:04:59 +0900 Subject: [PATCH] update description of manual_repeat_n --- clippy_lints/src/methods/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index f6b2495ccb0d..30a25965a89c 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -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