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`.)
This commit is contained in:
Nicholas Nethercote 2024-05-07 08:05:02 +10:00
parent d7814e72eb
commit f5d7d346a4
4 changed files with 8 additions and 245 deletions

View file

@ -82,7 +82,6 @@ pub mod svh;
pub mod sync;
pub mod tagged_ptr;
pub mod temp_dir;
pub mod tiny_list;
pub mod transitive_relation;
pub mod unhash;
pub mod unord;