-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
As discussed in other PRs, having to deal with cleanup operations after a normal operation and returning any errors in the correct order is noisy and error prone.
E.g.:
let export_res = Status::from(unsafe {
psa_crypto_sys::psa_export_public_key(
handle,
data.as_mut_ptr(),
data.len(),
&mut data_length,
)
})
.to_result();
key.close_handle(handle)?;
export_res?;
Ok(data_length)
(not sure if the errors are returned in the 'correct' order here!)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request