1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::index::{FromIndex, IntoIndex};

const DIM: usize = 1;
type Tuple = usize;

impl IntoIndex<DIM> for Tuple {
    #[inline(always)]
    fn into_index(self) -> [usize; DIM] {
        [self]
    }
}

impl FromIndex<DIM> for Tuple {
    #[inline(always)]
    fn from_index(index: [usize; DIM]) -> Self {
        index[0]
    }
}