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

[Merged by Bors] - Lint for sum and product in consensus code #2226

Closed
wants to merge 1 commit into from

Conversation

michaelsproul
Copy link
Member

Issue Addressed

Closes #1621

Proposed Changes

Use the disallowed_method lint to ban uses of Iterator::{sum,product} from types and state_processing.

Additional Info

The lint is turned off in the tree hash caching code, as it is performance sensitive and overflowy arithmetic is already allowed there.

@michaelsproul michaelsproul added ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! labels Feb 26, 2021
@michaelsproul
Copy link
Member Author

Thanks again to @ilknarf for writing the lint and getting it merged into Clippy!

Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Nice one!

@paulhauner paulhauner added ready-for-merge This PR is ready to merge. and removed low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-review The code is ready for review labels Feb 28, 2021
@michaelsproul
Copy link
Member Author

michaelsproul commented Mar 1, 2021

Thanks!

bors r+

bors bot pushed a commit that referenced this pull request Mar 1, 2021
## Issue Addressed

Closes #1621

## Proposed Changes

Use the `disallowed_method` lint to ban uses of `Iterator::{sum,product}` from `types` and `state_processing`.

## Additional Info

The lint is turned off in the tree hash caching code, as it is performance sensitive and overflowy arithmetic is already allowed there.
@bors bors bot changed the title Lint for sum and product in consensus code [Merged by Bors] - Lint for sum and product in consensus code Mar 1, 2021
@bors bors bot closed this Mar 1, 2021
@michaelsproul michaelsproul deleted the consensus-clippy branch March 1, 2021 03:02
michaelsproul added a commit that referenced this pull request Mar 10, 2021
## Issue Addressed

Closes #1621

## Proposed Changes

Use the `disallowed_method` lint to ban uses of `Iterator::{sum,product}` from `types` and `state_processing`.

## Additional Info

The lint is turned off in the tree hash caching code, as it is performance sensitive and overflowy arithmetic is already allowed there.
michaelsproul added a commit that referenced this pull request Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants