pub fn write_u16_le(n: u16, slice: &mut [u8]) {
    assert!(slice.len() >= 2);
    let bytes = n.to_le_bytes();
    slice[0] = bytes[0];
    slice[1] = bytes[1];
}
Write a u16 in little endian format to the beginning of the given slice.
This panics if the slice has length less than 2.
src/bytes.rs