Skip to content

fix(clap): migrate deprecated #[clap(...)] usages to #[arg(...)] and …#109

Merged
melekes merged 4 commits intomainfrom
Himess_fix-clap-deprecated
Jun 19, 2025
Merged

fix(clap): migrate deprecated #[clap(...)] usages to #[arg(...)] and …#109
melekes merged 4 commits intomainfrom
Himess_fix-clap-deprecated

Conversation

@melekes
Copy link
Collaborator

@melekes melekes commented Jun 10, 2025

…#[command(...)]

Port-of: cometbft/tendermint-rs#1492

@melekes melekes self-assigned this Jun 10, 2025
@melekes melekes requested review from Copilot and greg-szabo June 10, 2025 11:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates deprecated #[clap(...)] attributes to the new #[arg(...)] and #[command(...)] patterns, adjusts a time utility to use the Month enum, and silences lint warnings on some router methods.

  • Migrate all #[clap(...)] to #[arg(...)] (and one flatten to #[command(...)])
  • Update num_days_in_month to use time::Month and days_in_month
  • Add #[allow(dead_code)] to unused router methods

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
rpc/src/client/transport/router.rs Silence dead-code lint on two subscription methods
pbt-gen/src/time.rs Convert raw u8 months to time::Month, call days_in_month
light-client-cli/src/main.rs Replace #[clap] with #[arg] for flags and one flatten change
Comments suppressed due to low confidence (3)

rpc/src/client/transport/router.rs:94

  • [nitpick] Consider removing or documenting this unused add method instead of silencing the lint; it may be dead code or require tests before allowing it.
#[allow(dead_code)]

rpc/src/client/transport/router.rs:109

  • [nitpick] This remove_by_query method is marked as dead code; either remove it if unused or add a comment explaining its retention.
#[allow(dead_code)]

pbt-gen/src/time.rs:65

  • [nitpick] For consistency, group this import with the other time imports at the top of the module.
use time::Month;

@melekes melekes merged commit d26dc71 into main Jun 19, 2025
20 of 21 checks passed
@melekes melekes deleted the Himess_fix-clap-deprecated branch June 19, 2025 14:12
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.

3 participants