From beb0af9763316de08a627a15e9917020c810404d Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Tue, 24 Oct 2023 21:13:22 +0200 Subject: [PATCH] Rename IIFE to try Too good of an idea to forget --- crates/util/src/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/util/src/util.rs b/crates/util/src/util.rs index 629f950014..8bc0607f9d 100644 --- a/crates/util/src/util.rs +++ b/crates/util/src/util.rs @@ -352,7 +352,7 @@ pub fn unzip_option(option: Option<(T, U)>) -> (Option, Option) { /// Immediately invoked function expression. Good for using the ? operator /// in functions which do not return an Option or Result #[macro_export] -macro_rules! iife { +macro_rules! try { ($block:block) => { (|| $block)() }; @@ -361,7 +361,7 @@ macro_rules! iife { /// Async Immediately invoked function expression. Good for using the ? operator /// in functions which do not return an Option or Result. Async version of above #[macro_export] -macro_rules! async_iife { +macro_rules! async_try { ($block:block) => { (|| async move { $block })() };