inline variable

This commit is contained in:
Simon Gardling 2022-05-20 12:56:41 -04:00
parent 7a00661e46
commit 685ff25631

View File

@ -349,7 +349,8 @@ pub const fn hashed_storage_read(data: &str) -> Option<(HashBytes, &[u8])> {
let decoded_1: &[u8] = unsafe { std::mem::transmute::<&str, &[u8]>(data) };
let hash: HashBytes = unsafe { *(decoded_1[..HASH_LENGTH].as_ptr() as *const HashBytes) };
Some((hash, &decoded_1[HASH_LENGTH..]))
Some((
unsafe { *(decoded_1[..HASH_LENGTH].as_ptr() as *const HashBytes) },
&decoded_1[HASH_LENGTH..],
))
}