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: Apply Clippy lints single_match and redundant_pattern_matching #5740

Conversation

jbencin
Copy link
Contributor

@jbencin jbencin commented Jan 23, 2025

Description

Apply the following Clippy lints:

  • single_match
  • redundant_pattern_matching

These lints reduce certain match and if let statements into simpler forms, and result in 370 fewer lines of code

@jbencin jbencin added the lint Related to linting/clippy/cargo warns label Jan 23, 2025
@jbencin jbencin requested a review from a team as a code owner January 23, 2025 19:01
obycode
obycode previously approved these changes Jan 23, 2025
obycode
obycode previously approved these changes Jan 24, 2025
kantai
kantai previously approved these changes Jan 24, 2025
Copy link
Member

@kantai kantai left a comment

Choose a reason for hiding this comment

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

LGTM, just had a suggestion for a few additional opportunistic refactors.

@jbencin jbencin requested a review from jferrant January 25, 2025 01:46
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

Looks good. I just triggered a retry of the failing tests.

  • tests::nakamoto_integrations::follower_bootup_across_multiple_cycles
  • tests::signer::v0::no_reorg_due_to_successive_block_validation_ok
  • tests::signer::v0::single_miner_empty_sortition
  • net::tests::convergence::test_walk_star_allowed_15
  • net::tests::convergence::test_walk_star_15_plain

obycode
obycode previously approved these changes Jan 27, 2025
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

👍

obycode
obycode previously approved these changes Jan 28, 2025
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM, assuming tests pass.

jferrant
jferrant previously approved these changes Jan 29, 2025
@jbencin jbencin enabled auto-merge January 29, 2025 17:55
@jbencin jbencin dismissed stale reviews from jferrant and obycode via d64b017 January 29, 2025 19:53
@jbencin jbencin requested review from jferrant and obycode January 29, 2025 19:53
@obycode
Copy link
Contributor

obycode commented Jan 31, 2025

Quick review of failing tests:

@jbencin jbencin added this pull request to the merge queue Feb 1, 2025
Merged via the queue into stacks-network:develop with commit d2ed454 Feb 1, 2025
175 of 181 checks passed
@jbencin jbencin deleted the chore/clippy-single-match-and-redundant-pattern-matching branch February 1, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lint Related to linting/clippy/cargo warns
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants