From c4aabbf602c5e79bf560fda31c4d1cbbf7f052aa Mon Sep 17 00:00:00 2001 From: vic1707 <28602203+vic1707@users.noreply.github.com> Date: Fri, 27 Oct 2023 23:33:43 +0200 Subject: [PATCH] allow for 0 argument functions --- src/utils/macros.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/macros.rs b/src/utils/macros.rs index adf6b93..d7cda22 100644 --- a/src/utils/macros.rs +++ b/src/utils/macros.rs @@ -21,6 +21,9 @@ pub(crate) use yeet; #[doc(hidden)] macro_rules! wrap_into_closure { + ($function:expr, 0) => { + move |_| $function() + }; ($function:expr, 1) => { #[allow(clippy::indexing_slicing)] move |args| $function(args[0])