aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 04:54:26 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 04:54:26 +0000
commit0a8c08ca4406c977c6923dfe4314360c28fe5227 (patch)
tree920f690346620be8f3e538141249f6331fa01d4e /src/lib.rs
parent010f03ae1068769df703c5ba84004d5579728652 (diff)
parent9d69f56f4e1fde5260b6d129c57b30af15037a10 (diff)
downloadasync-task-0a8c08ca4406c977c6923dfe4314360c28fe5227.tar.gz
Change-Id: I9834050046331edaf2685f471a22b2fb6e18ed5c
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 4a868bf..dd689ec 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -74,6 +74,17 @@
extern crate alloc;
+/// We can't use `?` in const contexts yet, so this macro acts
+/// as a workaround.
+macro_rules! leap {
+ ($x: expr) => {{
+ match ($x) {
+ Some(val) => val,
+ None => return None,
+ }
+ }};
+}
+
mod header;
mod raw;
mod runnable;