Rename IIFE to try

Too good of an idea to forget
This commit is contained in:
Mikayla Maki 2023-10-24 21:13:22 +02:00 committed by GitHub
parent cc9e92857b
commit beb0af9763
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -352,7 +352,7 @@ pub fn unzip_option<T, U>(option: Option<(T, U)>) -> (Option<T>, Option<U>) {
/// Immediately invoked function expression. Good for using the ? operator /// Immediately invoked function expression. Good for using the ? operator
/// in functions which do not return an Option or Result /// in functions which do not return an Option or Result
#[macro_export] #[macro_export]
macro_rules! iife { macro_rules! try {
($block:block) => { ($block:block) => {
(|| $block)() (|| $block)()
}; };
@ -361,7 +361,7 @@ macro_rules! iife {
/// Async Immediately invoked function expression. Good for using the ? operator /// Async Immediately invoked function expression. Good for using the ? operator
/// in functions which do not return an Option or Result. Async version of above /// in functions which do not return an Option or Result. Async version of above
#[macro_export] #[macro_export]
macro_rules! async_iife { macro_rules! async_try {
($block:block) => { ($block:block) => {
(|| async move { $block })() (|| async move { $block })()
}; };