Be explicit that we're handling bytes

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
Jubilee 2020-08-20 15:55:02 -07:00 committed by Jubilee Young
parent 74b4eea64d
commit fe2a867125

View File

@ -570,7 +570,7 @@ pub fn write_target_uint(
#[inline]
pub fn read_target_uint(endianness: Endian, mut source: &[u8]) -> Result<u128, io::Error> {
let mut buf = [0; 16];
let mut buf = [0u8; std::mem::size_of::<u128>()];
source.read(&mut buf)?;
match endianness {
Endian::Little => Ok(u128::from_le_bytes(buf)),