pub fn bytes_to_hex(i: &[u8], o: &mut [u8]) -> Result<(), Error> {
    if i.len() * 2 > o.len() {
        return Err(Error::BufferTooSmall);
    }

    for (i, o) in i.iter().zip(o.chunks_mut(2)) {
        o[0] = half_byte_to_hex(i >> 4);
        o[1] = half_byte_to_hex(i & 0xF);
    }
    Ok(())
}
/// Convert a slice of bytes to a slice of hex characters
Convert a slice of bytes to a slice of hex characters
Convert a slice of bytes to a slice of hex characters
pub fn bytes_to_hex(i: &[u8], o: &mut [u8]) -> Result<(), Error> {
    if i.len() * 2 > o.len() {
        return Err(Error::BufferTooSmall);
    }
    for (i, o) in i.iter().zip(o.chunks_mut(2)) {
        o[0] = half_byte_to_hex(i >> 4);
        o[1] = half_byte_to_hex(i & 0xF);
    }
    Ok(())
}
pub fn bytes_to_hex ( i : & [ u8 ] , o : & mut [ u8 ] ) -> Result < ( ) , Error > { if i . len ( ) * 2 > o . len ( ) { return Err ( Error :: BufferTooSmall ) ; } for ( i , o ) in i . iter ( ) . zip ( o . chunks_mut ( 2 ) ) { o [ 0 ] = half_byte_to_hex ( i >> 4 ) ; o [ 1 ] = half_byte_to_hex ( i & 0xF ) ; } Ok ( ( ) ) }
Convert a slice of bytes to a slice of hex characters
Convert a slice of bytes to a slice of hex characters
i
&[u8]
o
&mut [u8]
i
&[u8]
o
&mut [u8]