From 9214f5ddac4dea09383b0473d4dda610d78cd3d5 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sun, 29 Jan 2023 22:57:24 -0600 Subject: [PATCH] Remove trailing semicolon from `do_read` macro Fixes #23 This will allow the macro to continue to be used in expression position (e.g. match arms), where semicolons are not allowed. --- src/policy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/policy.rs b/src/policy.rs index c2ab54b..2ea4128 100644 --- a/src/policy.rs +++ b/src/policy.rs @@ -22,7 +22,7 @@ pub struct DoRead(pub bool); /// Shorthand for `return DoRead(bool)` or `return DoRead(true)` (empty invocation) #[macro_export] macro_rules! do_read ( - ($val:expr) => ( return $crate::policy::DoRead($val); ); + ($val:expr) => ( return $crate::policy::DoRead($val) ); () => ( do_read!(true); ) );