Skip to content

Commit

Permalink
Remove trailing semicolon from do_read macro
Browse files Browse the repository at this point in the history
Fixes abonander#23

This will allow the macro to continue to be used in expression
position (e.g. match arms), where semicolons are not allowed.
  • Loading branch information
Aaron1011 committed Jan 30, 2023
1 parent 4c59a0f commit 9214f5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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); )
);

Expand Down

0 comments on commit 9214f5d

Please sign in to comment.