Skip to content

docs(ffi): copy-paste error #2604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion capi/include/hyper.h
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,9 @@ struct hyper_waker *hyper_context_waker(struct hyper_context *cx);
void hyper_waker_free(struct hyper_waker *waker);

/*
Free a waker that hasn't been woken.
Wake up the task associated with a waker.

NOTE: This consumes the waker. You should not use or free the waker afterwards.
*/
void hyper_waker_wake(struct hyper_waker *waker);

Expand Down
4 changes: 3 additions & 1 deletion src/ffi/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ ffi_fn! {
}

ffi_fn! {
/// Free a waker that hasn't been woken.
/// Wake up the task associated with a waker.
///
/// NOTE: This consumes the waker. You should not use or free the waker afterwards.
fn hyper_waker_wake(waker: *mut hyper_waker) {
let waker = unsafe { Box::from_raw(waker) };
waker.waker.wake();
Expand Down