#queue #size #heap-allocation #expand #elements #fifo-queue #stores

smallqueue

A queue with a no-alloc optimization when the size is 1 or 0

1 unstable release

Uses old Rust 2015

0.1.0 Nov 16, 2018

#24 in #fifo-queue


Used in 3 crates (2 directly)

MIT license

5KB
73 lines

Small Queue

A FIFO queue which stores its data in-place when containing 0 or 1 elements, but expands to a dynamically sized heap allocation when more elements are inserted, and can free its heap allocation if the size returns later to 1 or 0.

Dependencies

~3KB