Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit f15d558

Browse files
committed
remove lifetime parameters from ArgMatches
1 parent b182740 commit f15d558

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

token/cli/src/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use {
2222
};
2323

2424
pub(crate) async fn bench_process_command(
25-
matches: &ArgMatches<'_>,
25+
matches: &ArgMatches,
2626
config: &Config<'_>,
2727
mut signers: Vec<Arc<dyn Signer>>,
2828
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,

token/cli/src/command.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn new_throwaway_signer() -> (Arc<dyn Signer>, Pubkey) {
9696
}
9797

9898
fn get_signer(
99-
matches: &ArgMatches<'_>,
99+
matches: &ArgMatches,
100100
keypair_name: &str,
101101
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
102102
) -> Option<(Arc<dyn Signer>, Pubkey)> {
@@ -108,7 +108,7 @@ fn get_signer(
108108
})
109109
}
110110

111-
fn parse_amount_or_all(matches: &ArgMatches<'_>) -> Option<f64> {
111+
fn parse_amount_or_all(matches: &ArgMatches) -> Option<f64> {
112112
match matches.value_of("amount").unwrap() {
113113
"ALL" => None,
114114
amount => Some(amount.parse::<f64>().unwrap()),
@@ -3445,7 +3445,7 @@ struct ConfidentialTransferArgs {
34453445

34463446
pub async fn process_command<'a>(
34473447
sub_command: &CommandName,
3448-
sub_matches: &ArgMatches<'_>,
3448+
sub_matches: &ArgMatches,
34493449
config: &Config<'a>,
34503450
mut wallet_manager: Option<Rc<RemoteWalletManager>>,
34513451
mut bulk_signers: Vec<Arc<dyn Signer>>,

token/cli/src/config.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use {
2828

2929
type SignersOf = Vec<(Arc<dyn Signer>, Pubkey)>;
3030
fn signers_of(
31-
matches: &ArgMatches<'_>,
31+
matches: &ArgMatches,
3232
name: &str,
3333
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
3434
) -> Result<Option<SignersOf>, Box<dyn std::error::Error>> {
@@ -73,7 +73,7 @@ pub struct Config<'a> {
7373

7474
impl<'a> Config<'a> {
7575
pub async fn new(
76-
matches: &ArgMatches<'_>,
76+
matches: &ArgMatches,
7777
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
7878
bulk_signers: &mut Vec<Arc<dyn Signer>>,
7979
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -124,7 +124,7 @@ impl<'a> Config<'a> {
124124
}
125125

126126
fn extract_multisig_signers(
127-
matches: &ArgMatches<'_>,
127+
matches: &ArgMatches,
128128
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
129129
bulk_signers: &mut Vec<Arc<dyn Signer>>,
130130
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -144,7 +144,7 @@ impl<'a> Config<'a> {
144144
}
145145

146146
pub async fn new_with_clients_and_ws_url(
147-
matches: &ArgMatches<'_>,
147+
matches: &ArgMatches,
148148
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
149149
bulk_signers: &mut Vec<Arc<dyn Signer>>,
150150
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -331,7 +331,7 @@ impl<'a> Config<'a> {
331331
// return the associated token address for the default address.
332332
pub(crate) async fn associated_token_address_or_override(
333333
&self,
334-
arg_matches: &ArgMatches<'_>,
334+
arg_matches: &ArgMatches,
335335
override_name: &str,
336336
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
337337
) -> Result<Pubkey, Error> {
@@ -350,7 +350,7 @@ impl<'a> Config<'a> {
350350
// return the associated token address for the default address.
351351
pub(crate) async fn associated_token_address_for_token_or_override(
352352
&self,
353-
arg_matches: &ArgMatches<'_>,
353+
arg_matches: &ArgMatches,
354354
override_name: &str,
355355
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
356356
token: Option<Pubkey>,
@@ -382,7 +382,7 @@ impl<'a> Config<'a> {
382382
// address if there is one
383383
pub(crate) fn pubkey_or_default(
384384
&self,
385-
arg_matches: &ArgMatches<'_>,
385+
arg_matches: &ArgMatches,
386386
address_name: &str,
387387
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
388388
) -> Result<Pubkey, Error> {

0 commit comments

Comments
 (0)