Skip to content

bench: use iter::repeat_n for clippy::manual_repeat_n - #24

Open
boris-42 wants to merge 1 commit into
asciinema:mainfrom
itlook:bench-iter-repeat-n
Open

boris-42 wants to merge 1 commit into
asciinema:mainfrom
itlook:bench-iter-repeat-n

Conversation

@boris-42

Copy link
Copy Markdown

clippy 1.81 added the manual_repeat_n lint, which fires on iter::repeat(x).take(n).collect() and recommends the more direct iter::repeat_n(x, n).collect().

No behavioural change; functionally identical, just less idiomatic-by-2024-standards. Drive-by patch independent of any other work.

clippy 1.81 added the `manual_repeat_n` lint, which fires on
`iter::repeat(x).take(n).collect()` and recommends the more
direct `iter::repeat_n(x, n).collect()`.

No behavioural change; functionally identical, just less
idiomatic-by-2024-standards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant