rust/tests
Fridtjof Stoldt 67e6bf33fe
Suggest using Vec::extend() in same_item_push (#13987)
Using `Vec::extend(std::iter::repeat_n(item, N))` allows to use the more
natural number of elements to add `N`, as is probably done in the
original loop, instead of computing the difference between the existing
number of elements and the wanted one.

Before MSRV 1.82, the older suggestion to use `Vec::resize()` is still
issued.

Inspired by #6156 (which predates `repeat_n()`).

changelog: [`same_item_push`]: recommend using `Vec::extend()` to extend
a vector
2025-01-22 14:41:13 +00:00
..
test_utils
ui Suggest using Vec::extend() in same_item_push (#13987) 2025-01-22 14:41:13 +00:00
ui-cargo Merge commit '68a799aea9' into clippy-subtree-update 2024-06-27 18:56:04 +02:00
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2025-01-09 18:00:37 +01:00
ui-toml Merge remote-tracking branch 'upstream/master' into rustup 2025-01-09 18:00:37 +01:00
workspace_test Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
check-fmt.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
clippy.toml
compile-test.rs In edition 2024, std::env::set_var is unsafe 2025-01-13 15:58:11 +01:00
config-metadata.rs Merge commit 'a109190d70' into clippy-subtree-update 2024-10-18 13:44:06 +02:00
dogfood.rs Merge commit '7901289135' into clippy-subtree-update 2024-09-24 11:58:04 +02:00
headers.rs
integration.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
lint_message_convention.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
missing-test-files.rs Apply unnecessary_semicolon to Clippy sources 2025-01-19 15:34:07 +01:00
versioncheck.rs Apply unnecessary_semicolon to Clippy sources 2025-01-19 15:34:07 +01:00
workspace.rs Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00