ds-decomp 0.11.0

Library for ds-decomp, a DS decompilation toolkit.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub trait FromSlice {
    fn from_le_slice(s: &[u8]) -> Self;
}

impl FromSlice for u32 {
    fn from_le_slice(s: &[u8]) -> Self {
        assert!(s.len() >= 4);
        u32::from_le_bytes([s[0], s[1], s[2], s[3]])
    }
}

impl FromSlice for u16 {
    fn from_le_slice(s: &[u8]) -> Self {
        assert!(s.len() >= 2);
        u16::from_le_bytes([s[0], s[1]])
    }
}