diff --git a/utils/app/src/lib.rs b/utils/app/src/lib.rs index 64ad2a1..eaf3cce 100644 --- a/utils/app/src/lib.rs +++ b/utils/app/src/lib.rs @@ -157,11 +157,10 @@ pub fn dataset_append(original_data: &str, new_data: &str) -> PyResult<(String, let message = format!("enclave ECALL failed: {result}!"); return Err(PyValueError::new_err(message)); } - let complete_data = - unsafe { slice::from_raw_parts(complete_data.as_ptr(), complete_data_len.into()) }; + let complete_data = unsafe { slice::from_raw_parts(complete_data.as_ptr(), complete_data_len) }; let complete_data_hash = unsafe { slice::from_raw_parts(complete_data_hash.as_ptr(), HASH_SIZE_IN_BYTES) }; - let complete_data = String::from_utf8_lossy(&complete_data); - let complete_data_hash = String::from_utf8_lossy(&complete_data_hash); + let complete_data = String::from_utf8_lossy(complete_data); + let complete_data_hash = String::from_utf8_lossy(complete_data_hash); Ok((complete_data.into(), complete_data_hash.into())) }