Skip to content

Commit

Permalink
debug_assert_eq! on delete_async_work for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
dherman committed Nov 26, 2024
1 parent 4f0adfc commit 77929a5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/neon/src/sys/async_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ unsafe extern "C" fn call_complete<I, O, D>(env: Env, status: napi::Status, data
..
} = *Box::<Data<I, O, D>>::from_raw(data.cast());

if napi::delete_async_work(env, work).is_err() {
panic!("Failed to delete async work");
}
debug_assert_eq!(napi::delete_async_work(env, work), Ok(()));

BOUNDARY.catch_failure(env, None, move |env| {
// `unwrap` is okay because `call_complete` should be called exactly once
Expand Down

0 comments on commit 77929a5

Please sign in to comment.