diff --git a/Cargo.toml b/Cargo.toml index e743706..1a425b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ckb-x64-simulator" description = "A simulator that allows running CKB smart contracts on x64 environment for tooling benefits" -version = "0.4.0" +version = "0.5.0" license = "MIT" authors = ["Nervos Core Dev "] edition = "2018" @@ -13,9 +13,9 @@ crate-type = ["lib", "staticlib", "cdylib"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-standalone-debugger = "0.3.0" -ckb-types = "0.37.0" -faster-hex = "0.4.1" +ckb-standalone-debugger = "0.20.0-rc3" +ckb-types = "0.100.0-rc2" +faster-hex = "0.6" lazy_static = "1.4" serde = "1.0" serde_derive = "1.0" diff --git a/src/lib.rs b/src/lib.rs index e3bbe30..1fab8b4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -309,7 +309,7 @@ pub extern "C" fn ckb_dlopen2( let mut buffer = vec![]; buffer.extend_from_slice(dep_cell_hash); buffer.push(hash_type); - let key = format!("0x{}", faster_hex::hex_string(&buffer).expect("faster hex")); + let key = format!("0x{}", faster_hex::hex_string(&buffer)); let filename = SETUP .native_binaries .get(&key) @@ -596,5 +596,6 @@ fn store_data(ptr: *mut c_void, len: *mut u64, offset: u64, data: &[u8]) { let full_size = data_len - offset; let real_size = std::cmp::min(size, full_size); *size_ptr = full_size; - buffer[..real_size as usize].copy_from_slice(&data[offset as usize..(offset + real_size) as usize]); + buffer[..real_size as usize] + .copy_from_slice(&data[offset as usize..(offset + real_size) as usize]); }