ringtail 0.2.2

Efficient ring buffer for byte buffers, FIFO queues, and SPSC channels
Documentation
//! Functions for allocating arrays.

/// Allocate an array of memory on the heap.
///
/// Note that the contents of the array are not initialized and the values are undefined.
pub unsafe fn allocate<T>(size: usize) -> Box<[T]> {
    let mut vec = Vec::with_capacity(size);
    vec.set_len(size);
    vec.into_boxed_slice()
}