Skip to content

Fix clippy warnings, fix #511 #513

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

Merged
merged 1 commit into from
Dec 1, 2018
Merged

Conversation

meven
Copy link
Contributor

@meven meven commented Dec 1, 2018

Fix #511

This simplify the code a little and avoid formatting string in expect blocks.

Copy link
Member

@ashleygwilliams ashleygwilliams left a comment

Choose a reason for hiding this comment

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

thanks for this PR! i'm generally ok with these changes but i'm curious as to why clippy prefers unwrap_or_else panic! to expect- i've asked in the clippy discord channel... do you happen to know why that is preferred? (it seems more verbose to me)

@badboy
Copy link
Member

badboy commented Dec 1, 2018

Probably because that defers actually calling the format function (or any function for that matter).

@ashleygwilliams ashleygwilliams merged commit 837fbc0 into rust-lang:master Dec 1, 2018
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.

3 participants