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

Fix bail with single str parameter #2

Merged
merged 1 commit into from
Oct 7, 2019

Conversation

repi
Copy link
Contributor

@repi repi commented Oct 7, 2019

Use bail! macro with a single str parameter such as bail!("This is a test") resulted in a compile error from a missing From conversion. . Fixed by just using the anyhow! macro also for single parameter bail!.

Alternatively one could add the needed conversion?

Also added small test to verify that that it compiles.

This was resulting in a missing From conversion, so now just use the anyhow macro also for single parameter bail.
Also added small test to verify that that it compiles.
Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay dtolnay merged commit 9c6fe32 into dtolnay:master Oct 7, 2019
@repi repi deleted the bail-single-str branch October 7, 2019 20:43
@dtolnay
Copy link
Owner

dtolnay commented Oct 7, 2019

Published in 1.0.1.

@repi
Copy link
Contributor Author

repi commented Oct 7, 2019

Awesome, thanks for super fast response and publishing! 👍

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 this pull request may close these issues.

2 participants