There is a useless heap allocation here that only serves to equalize the sizes of the ConcurrentQueue enum arms. As this queue is usually just shoved into a heap allocation for another structure, it seems like a waste of a heap allocation. Especially since only around four words of memory are wasted in the worse case, assuming a T with a size of a word.
This appears to have been added in https://github.com/smol-rs/concurrent-queue/commit/ee83323156e5b256819efd4e7e2058376ccf77f9, possibly in response to the Clippy warning that shows up otherwise
https://github.com/smol-rs/concurrent-queue/blob/22b5e83c4fbd126eddc1990647d0ce35ee754467/src/lib.rs#L106
There is a useless heap allocation here that only serves to equalize the sizes of the
ConcurrentQueue
enum arms. As this queue is usually just shoved into a heap allocation for another structure, it seems like a waste of a heap allocation. Especially since only around four words of memory are wasted in the worse case, assuming aT
with a size of a word.