Skip to content

Commit

Permalink
chore: please clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Feb 20, 2023
1 parent 8da4b0a commit cfd0466
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions utils/app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}

0 comments on commit cfd0466

Please sign in to comment.