fn alloc(cap: usize) -> Self {
        debug_assert_eq!(cap, cap.next_power_of_two());

        let mut v = Vec::with_capacity(cap);
        let ptr = v.as_mut_ptr();
        mem::forget(v);

        Buffer { ptr, cap }
    }
/// Allocates a new buffer with the specified capacity.
Allocates a new buffer with the specified capacity.
Allocates a new buffer with the specified capacity .
fn alloc(cap: usize) -> Self {
        debug_assert_eq!(cap, cap.next_power_of_two());
        let mut v = Vec::with_capacity(cap);
        let ptr = v.as_mut_ptr();
        mem::forget(v);
        Buffer { ptr, cap }
    }
fn alloc ( cap : usize ) -> Self { debug_assert_eq ! ( cap cap next_power_of_two ( ) ) ; let mut v = Vec :: with_capacity ( cap ) ; let ptr = v . as_mut_ptr ( ) ; mem :: forget ( v ) ; Buffer { ptr , cap } }
Allocates a new buffer with the specified capacity.
Allocates a new buffer with the specified capacity .
cap
usize
cap
usize