Skip to content

Commit 52d35de

Browse files
committed
Update help text to mention using repeat_n
1 parent 3c0ad9b commit 52d35de

File tree

1 file changed

+3
-2
lines changed
  • clippy_lints/src/methods

1 file changed

+3
-2
lines changed

clippy_lints/src/methods/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -4171,7 +4171,8 @@ declare_clippy_lint! {
41714171
/// ### What it does
41724172
///
41734173
/// Checks for `Iterator::map` over ranges without using the parameter which
4174-
/// could be more clearly expressed using `std::iter::repeat(...).take(...)`.
4174+
/// could be more clearly expressed using `std::iter::repeat(...).take(...)`
4175+
/// or `std::iter::repeat_n`.
41754176
///
41764177
/// ### Why is this bad?
41774178
///
@@ -4191,7 +4192,7 @@ declare_clippy_lint! {
41914192
///
41924193
/// ### Known Issues
41934194
///
4194-
/// This lint suggest replacing a `Map<Range>` with a `Take<RepeatWith>` or
4195+
/// This lint may suggest replacing a `Map<Range>` with a `Take<RepeatWith>` or
41954196
/// `Take<Repeat>`. The former implements some traits that the latter two do
41964197
/// not, such as `DoubleEndedIterator`. As a result, this may not always be an
41974198
/// appropriate suggestion.

0 commit comments

Comments
 (0)