diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-07 08:05:02 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-09 08:13:24 +1000 |
| commit | f5d7d346a48b75ef566674fca05cd4b29a985678 (patch) | |
| tree | 9cd66faef76065045a88c68a8a58ce0dffd5836d /compiler/rustc_mir_transform/src/coverage/mod.rs | |
| parent | d7814e72ebe3b4a293a5f91fa1648d2ef72639d3 (diff) | |
| download | rust-f5d7d346a48b75ef566674fca05cd4b29a985678.tar.gz rust-f5d7d346a48b75ef566674fca05cd4b29a985678.zip | |
Remove `TinyList`.
It is optimized for lists with a single element, avoiding the need for an allocation in that case. But `SmallVec<[T; 1]>` also avoids the allocation, and is better in general: more standard, log2 number of allocations if the list exceeds one item, and a much more capable API. This commit removes `TinyList` and converts the two uses to `SmallVec<[T; 1]>`. It also reorders the `use` items in the relevant file so they are in just two sections (`pub` and non-`pub`), ordered alphabetically, instead of many sections. (This is a relevant part of the change because I had to decide where to add a `use` item for `SmallVec`.)
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions
