Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
davidzeng0 committed Feb 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 175822a commit 3b08e22
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/future/mod.rs
Original file line number Diff line number Diff line change
@@ -28,6 +28,12 @@ pub struct Request<T> {
}

impl<T> Request<T> {
pub const fn no_op() -> Self {
fn no_op<T>(_: ReqPtr<T>, _: Ptr<()>, _: T) {}

Request::new(Ptr::null(), no_op)
}

pub const fn new(arg: Ptr<()>, callback: Complete<T>) -> Self {
Self { arg, callback }
}

0 comments on commit 3b08e22

Please sign in to comment.