Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim-crypto committed Mar 11, 2024
1 parent ac068bf commit 598abb8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions token/cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,13 @@ impl<'a> Config<'a> {
}
}

// In clap v2, `value_of` returns `None` if the argument id is not previously specified in
// `Arg`. In contrast, in clap v3, `value_of` panics in this case. Therefore, compared
// to the same function in solana-clap-utils, `signer_from_path` in solana-clap-v3-utils errors
// early when `path` is a valid pubkey, but `SIGNER_ARG.name` is not specified in the args.
// This function behaves exactly as `signer_from_path` from solana-clap-utils by catching
// this special case.
// In clap v2, `value_of` returns `None` if the argument id is not previously
// specified in `Arg`. In contrast, in clap v3, `value_of` panics in this case.
// Therefore, compared to the same function in solana-clap-utils,
// `signer_from_path` in solana-clap-v3-utils errors early when `path` is a
// valid pubkey, but `SIGNER_ARG.name` is not specified in the args.
// This function behaves exactly as `signer_from_path` from solana-clap-utils by
// catching this special case.
fn signer_from_path(
matches: &ArgMatches,
path: &str,
Expand Down

0 comments on commit 598abb8

Please sign in to comment.