about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-01-11 15:14:31 +0100
committerSamuel Tardieu <sam@rfc1149.net>2025-01-15 22:50:25 +0100
commitded9354dcf76aaa2cd2164a8b556f61c2f188d79 (patch)
tree0d3884da3794a7189710486b141996fc18118661 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentab55d3fc62c091fbc4b4273347aa8532976741e3 (diff)
downloadrust-ded9354dcf76aaa2cd2164a8b556f61c2f188d79.tar.gz
rust-ded9354dcf76aaa2cd2164a8b556f61c2f188d79.zip
Suggest using `Vec::extend()` in `same_item_push`
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions