fix(clap): migrate deprecated #[clap(...)] usages to #[arg(...)] and …#109
Merged
fix(clap): migrate deprecated #[clap(...)] usages to #[arg(...)] and …#109
Conversation
…#[command(...)] Port-of: cometbft/tendermint-rs#1492
There was a problem hiding this comment.
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 oneflattento#[command(...)]) - Update
num_days_in_monthto usetime::Monthanddays_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
addmethod 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_querymethod 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
timeimports at the top of the module.
use time::Month;
greg-szabo
approved these changes
Jun 18, 2025
Co-authored-by: Copilot <[email protected]>
This reverts commit 174a59e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…#[command(...)]
Port-of: cometbft/tendermint-rs#1492