This commit is contained in:
Simon Gardling
2023-08-25 11:07:59 -04:00
parent 7e1fe54d59
commit 3d0d3ef7a3
7 changed files with 43 additions and 10 deletions

View File

@@ -164,8 +164,8 @@ pub const HASH_LENGTH: usize = 8;
pub type HashBytes = [u8; HASH_LENGTH];
#[allow(dead_code)]
pub fn hashed_storage_create(hashbytes: &HashBytes, data: &[u8]) -> String {
unsafe { std::mem::transmute::<Vec<u8>, String>([hashbytes, data].concat()) }
pub fn hashed_storage_create(hashbytes: HashBytes, data: &[u8]) -> String {
unsafe { std::mem::transmute::<Vec<u8>, String>([hashbytes.to_vec(), data.to_vec()].concat()) }
}
#[allow(dead_code)]