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 compatibility with 'deny(rust_2018_idioms)' #56

Merged
merged 2 commits into from May 7, 2021

Conversation

Byron
Copy link
Contributor

@Byron Byron commented Apr 27, 2021

In crates with #![forbid|deny(rust_2018_idioms)] the code generated by the quick_error macro will now cause linter errors.

This commit turns these on in the crate itself and fixes them in two ways:

  • blanket #[allow(unused)] was replaced with a more specific version
  • the lifetime in std::fmt::Formatter types is declared

I hope a new patch release could be made if merging this PR is possible :).

In crates with
 #![forbid|deny(rust_2018_idioms)]
the code generated by the quick_error macro will now cause linter
errors.

This commit turns these on in the crate itself and fixes them in two
ways:

* blanket #[allow(unused)] was replaced with a more specific version
* the lifetime in std::fmt::Formatter types is declareed
@tailhook
Copy link
Owner

Looks good. But please submit PR without whitespace changes.

Thank you, `git checkout HEAD~1 -p`
@Byron
Copy link
Contributor Author

Byron commented Apr 27, 2021

Sorry for that, 'format on save' is your friend until it isn't 🤦‍♂️.

I also tried, without success, to prevent rustfmt from touching the entire file and failed. That was a surprisingly unpolished experience or I shouldn't try such preposterous things early in the morning 😅.

@tailhook tailhook merged commit e7a8571 into tailhook:master May 7, 2021
@tailhook
Copy link
Owner

tailhook commented May 7, 2021

Merged. Thanks!

@tailhook
Copy link
Owner

tailhook commented May 7, 2021

Released as v2.0.1

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.

None yet

2 participants