copy-stack-vec 0.1.0

A no_std, fixed-capacity, stack-allocated Copy vector for Copy types, with no unsafe code by default.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// This file is part of copy-stack-vec.
// SPDX-License-Identifier: MIT OR Apache-2.0

// Crate imports
use crate::vec::CopyStackVec;

// Core imports
use core::mem::MaybeUninit;

impl<T: Copy, const N: usize> Default for CopyStackVec<T, N> {
    fn default() -> Self {
        Self {
            buf: [MaybeUninit::<T>::uninit(); N],
            len: 0,
        }
    }
}