-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: bigger enclosing block to use guards in bulk. #7
Comments
Also would it better be a proc macro instead of declarative? The code looks tricky. |
This is ambiguous (one of the reasons the syntax was controversial in the RFC): guard_block! {
let x = if y { z } else { panic!() };
} Is it a regular I like tricky declarative macros! |
Why is this crate unpopular (no reverse deps, few downloads), e.g. compared to Possible reasons:
|
I think it's probably just not that common a use case combined with lack of
marketing. I basically made this crate as a proof of concept during the RFC.
On further investigation it seems that macro_rules limitations prevent
guard_block from working. I'll consider a procedural macro approach.
…On Mon, Apr 22, 2019 at 4:14 AM Vitaly Shukela ***@***.***> wrote:
Why is this crate unpopular (no reverse deps, few downloads), e.g.
compared to if_chain?
Possible reasons:
- Nobody needs guard lets; or
- There is competitor crate that is popular; or
- This crate works poorly; or
- There is some typical workaround everybody use?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAALPHYYWQCF2GRJPFR73Q3PRVXUPANCNFSM4HHDVNHA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to write something like
instead of encasing everything in additional level of parenthesis:
guard_block! { guard let Some(b) = a else { return; } }
is fine too.The text was updated successfully, but these errors were encountered: