pub(crate) fn read_data_u8(status: u8, raw: &mut &[u8]) -> Result<[u7; 2]> {
        let len = Self::msg_length(status);
        let data = raw
            .split_checked(len)
            .ok_or_else(|| err_invalid!("truncated midi message"))?;
        Ok(match len {
            1 => [u7::check_int(data[0])?, u7::from(0)],
            2 => [u7::check_int(data[0])?, u7::check_int(data[1])?],
            _ => [u7::from(0), u7::from(0)],
        })
    }
/// Extract the data bytes from a raw slice.
Extract the data bytes from a raw slice.
Extract the data bytes from a raw slice .
pub(crate) fn read_data_u8(status: u8, raw: &mut &[u8]) -> Result<[u7; 2]> {
        let len = Self::msg_length(status);
        let data = raw
            .split_checked(len)
            .ok_or_else(|| err_invalid!("truncated midi message"))?;
        Ok(match len {
            1 => [u7::check_int(data[0])?, u7::from(0)],
            2 => [u7::check_int(data[0])?, u7::check_int(data[1])?],
            _ => [u7::from(0), u7::from(0)],
        })
    }
pub ( crate ) fn read_data_u8 ( status : u8 , raw : & mut & [ u8 ] ) -> Result < [ u7 ; 2 ] > { let len = Self :: msg_length ( status ) ; let data = raw . split_checked ( len ) . ok_or_else ( | | err_invalid ! ( " " ) ) ? ; Ok ( match len { 1 => [ u7 :: check_int ( data [ 0 ] ) ? , u7 :: from ( 0 ) ] , 2 => [ u7 :: check_int ( data [ 0 ] ) ? , u7 :: check_int ( data [ 1 ] ) ? ] , _ => [ u7 :: from ( 0 ) , u7 :: from ( 0 ) ] , } ) }
Extract the data bytes from a raw slice.
Extract the data bytes from a raw slice .
status
u8
raw
&mut &[u8]
status
u8
raw
&mut &[u8]