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

chore: fix clippy for version 0.1.81 #2371

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

ArniStarkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

This PR is a replica of #2365 except for one difference. This PR does not include a disable of one part of the CI.

Reviewable status: 0 of 30 files reviewed, all discussions resolved (waiting on @dorimedini-starkware)

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 30 of 30 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArniStarkware)


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 244 at r1 (raw file):

            Some(h) => h < height,
            None => true,
        } {

wonder why clippy thinks this is better

Code quote:

        if match self.current_height {
            Some(h) => h < height,
            None => true,
        } {

.github/workflows/papyrus_docker-publish.yml.disabled line 0 at r1 (raw file):
why was this renamed?

Copy link

github-actions bot commented Dec 1, 2024

@ArniStarkware ArniStarkware force-pushed the arni/clippy-fix/v0_1_81_without_ci_fix branch from 0c5a30e to ab84b23 Compare December 1, 2024 11:13
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)

@ArniStarkware
Copy link
Contributor Author

crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 244 at r1 (raw file):

Previously, dorimedini-starkware wrote…

wonder why clippy thinks this is better

error[E0658]: use of unstable library feature 'is_none_or'
   --> crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs:274:32
    |
274 |         if self.current_height.is_none_or(|h| height > h) {

rust-lang/rust#126383

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 244 at r2 (raw file):

            Some(h) => h < height,
            None => true,
        } {

how about this?

Suggestion:

        if self.current_height.map(|h| h < height).unwrap_or(true) {

Copy link
Contributor Author

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)


.github/workflows/papyrus_docker-publish.yml.disabled line at r1 (raw file):

Previously, dorimedini-starkware wrote…

why was this renamed?

In the current revision 2 of this PR, there is no rename.
Now this PR is actually different than #2365

@ArniStarkware ArniStarkware force-pushed the arni/clippy-fix/v0_1_81_without_ci_fix branch from ab84b23 to e0ff236 Compare December 1, 2024 11:21
@ArniStarkware
Copy link
Contributor Author

crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 244 at r2 (raw file):

Previously, dorimedini-starkware wrote…

how about this?

Done.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArniStarkware)

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.98%. Comparing base (e3165c4) to head (e0ff236).
Report is 638 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2371       +/-   ##
===========================================
+ Coverage   40.10%   53.98%   +13.88%     
===========================================
  Files          26      256      +230     
  Lines        1895    29247    +27352     
  Branches     1895    29247    +27352     
===========================================
+ Hits          760    15790    +15030     
- Misses       1100    12293    +11193     
- Partials       35     1164     +1129     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ArniStarkware ArniStarkware merged commit 2224fdb into main Dec 1, 2024
22 checks passed
@ArniStarkware ArniStarkware deleted the arni/clippy-fix/v0_1_81_without_ci_fix branch December 1, 2024 11:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants