pub fn assert_version(payload: &[u8], v: u32) {
    let mut dec = Decoder::from(payload);
    assert_eq!(dec.decode_byte().unwrap() & 0x80, 0x80, "is long header");
    assert_eq!(dec.decode_uint(4).unwrap(), u64::from(v));
}
/// Simple checks for the version being correct.
/// # Panics
/// If this is not a long header packet with the given version.
Simple checks for the version being correct.
Simple checks for the version being correct .
pub fn assert_version(payload: &[u8], v: u32) {
    let mut dec = Decoder::from(payload);
    assert_eq!(dec.decode_byte().unwrap() & 0x80, 0x80, "is long header");
    assert_eq!(dec.decode_uint(4).unwrap(), u64::from(v));
}
pub fn assert_version ( payload : & [ u8 ] , v : u32 ) { let mut dec = Decoder :: from ( payload ) ; assert_eq ! ( dec decode_byte ( ) unwrap ( ) 0x80 0x80 " " ) ; assert_eq ! ( dec decode_uint ( 4 ) unwrap ( ) u64 from ( v ) ) ; }
Simple checks for the version being correct.
Simple checks for the version being correct .
payload
&[u8]
v
u32
panics
If this is not a long header packet with the given version.
If this is not a long header packet with the given version .