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

Mark constant functions with const #571

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

julianbraha
Copy link
Contributor

Using const for constant functions allows the compiler to evaluate them at compile-time, and allows the calling functions to be const, too.

These functions were detected with the clippy lint:
https://rust-lang.github.io/rust-clippy/master/index.html#/missing_const_for_fn

@github-actions github-actions bot added crate: trace_decoder Anything related to the trace_decoder crate. crate: proof_gen Anything related to the proof_gen crate. crate: evm_arithmetization Anything related to the evm_arithmetization crate. labels Aug 30, 2024
@0xaatif 0xaatif mentioned this pull request Aug 31, 2024
@Nashtare Nashtare added this to the x Misc. milestone Sep 1, 2024
@einar-polygon
Copy link
Contributor

Good stuff. May I suggest you also use the opportunity to add the lint to our CI, so we cannot merge code that violates this rule going forward?

@0xaatif 0xaatif mentioned this pull request Sep 4, 2024
@0xaatif
Copy link
Contributor

0xaatif commented Sep 4, 2024

Good stuff. May I suggest you also use the opportunity to add the lint to our CI, so we cannot merge code that violates this rule going forward?

Let's discuss this in #587, @einar-polygon

@einar-polygon
Copy link
Contributor

I wasn't aware of the nursery status.

The current PR should be safe to merge.

Copy link
Contributor

@einar-polygon einar-polygon left a comment

Choose a reason for hiding this comment

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

Nothing problematic about these changes.

@muursh muursh merged commit 47c79ed into 0xPolygonZero:develop Sep 6, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate. crate: proof_gen Anything related to the proof_gen crate. crate: trace_decoder Anything related to the trace_decoder crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants