blockset 0.3.3

Data Block Set
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub trait ArrayEx {
    type Item;
    fn move_to_vec(self) -> Vec<Self::Item>;
}

impl<T: Sized, const N: usize> ArrayEx for [T; N] {
    type Item = T;
    fn move_to_vec(self) -> Vec<Self::Item> {
        let mut result = Vec::with_capacity(N);
        for i in self {
            result.push(i);
        }
        result
    }
}