Skip to content

Commit

Permalink
remove CleanupExecuted
Browse files Browse the repository at this point in the history
  • Loading branch information
lwshang committed Dec 10, 2024
1 parent c9ea941 commit b4d4c30
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions ic-cdk/src/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ pub enum CallError {
#[error("The call was rejected with code {0:?} and message: {1}")]
CallRejected(RejectCode, String),

/// The cleanup callback was executed.
//
// TODO: Is this really an error?
#[error("The cleanup callback was executed")]
CleanupExecuted,

/// The response could not be decoded.
#[error("Failed to decode the response as {0}")]
CandidDecodeFailed(String),
Expand Down Expand Up @@ -232,8 +226,6 @@ unsafe extern "C" fn cleanup<T: AsRef<[u8]>>(state_ptr: *const RwLock<CallFuture
//
// Borrowing does not trap - the rollback from the
// previous trap ensures that the RwLock can be borrowed again.
// TODO: Should we have this?
state.write().unwrap().result = Some(Err(CallError::CleanupExecuted));
let w = state.write().unwrap().waker.take();
if let Some(waker) = w {
// Flag that we do not want to actually wake the task - we
Expand Down

0 comments on commit b4d4c30

Please sign in to comment.