Skip to content
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

Add ensure macro? #1

Closed
repi opened this issue Oct 7, 2019 · 2 comments · Fixed by #4
Closed

Add ensure macro? #1

repi opened this issue Oct 7, 2019 · 2 comments · Fixed by #4

Comments

@repi
Copy link
Contributor

repi commented Oct 7, 2019

Have you though about adding an ensure! macro as well in the same vein as the one in failure?

We use failure today and with quite a bit of ensure! which I find makes quite compact and explicit code, and has a nice naming connection to assert!.

Would you be open to adding ensure! to this crate?

@dtolnay
Copy link
Owner

dtolnay commented Oct 7, 2019

Thanks @repi, good call. I would accept a PR to add an ensure macro.

@repi
Copy link
Contributor Author

repi commented Oct 7, 2019

Thanks, I'll look into it.

repi added a commit to EmbarkStudios/anyhow that referenced this issue Oct 7, 2019
@repi repi mentioned this issue Oct 7, 2019
@dtolnay dtolnay closed this as completed in #4 Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants