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

Commit 48f95be

Browse files
committed
remove lifetime parameters from ArgMatches
1 parent a5a34dc commit 48f95be

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()),
@@ -3444,7 +3444,7 @@ struct ConfidentialTransferArgs {
34443444

34453445
pub async fn process_command<'a>(
34463446
sub_command: &CommandName,
3447-
sub_matches: &ArgMatches<'_>,
3447+
sub_matches: &ArgMatches,
34483448
config: &Config<'a>,
34493449
mut wallet_manager: Option<Rc<RemoteWalletManager>>,
34503450
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
@@ -31,7 +31,7 @@ use {
3131

3232
type SignersOf = Vec<(Arc<dyn Signer>, Pubkey)>;
3333
fn signers_of(
34-
matches: &ArgMatches<'_>,
34+
matches: &ArgMatches,
3535
name: &str,
3636
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
3737
) -> Result<Option<SignersOf>, Box<dyn std::error::Error>> {
@@ -76,7 +76,7 @@ pub struct Config<'a> {
7676

7777
impl<'a> Config<'a> {
7878
pub async fn new(
79-
matches: &ArgMatches<'_>,
79+
matches: &ArgMatches,
8080
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
8181
bulk_signers: &mut Vec<Arc<dyn Signer>>,
8282
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -127,7 +127,7 @@ impl<'a> Config<'a> {
127127
}
128128

129129
fn extract_multisig_signers(
130-
matches: &ArgMatches<'_>,
130+
matches: &ArgMatches,
131131
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
132132
bulk_signers: &mut Vec<Arc<dyn Signer>>,
133133
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -147,7 +147,7 @@ impl<'a> Config<'a> {
147147
}
148148

149149
pub async fn new_with_clients_and_ws_url(
150-
matches: &ArgMatches<'_>,
150+
matches: &ArgMatches,
151151
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
152152
bulk_signers: &mut Vec<Arc<dyn Signer>>,
153153
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -357,7 +357,7 @@ impl<'a> Config<'a> {
357357
// return the associated token address for the default address.
358358
pub(crate) async fn associated_token_address_or_override(
359359
&self,
360-
arg_matches: &ArgMatches<'_>,
360+
arg_matches: &ArgMatches,
361361
override_name: &str,
362362
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
363363
) -> Result<Pubkey, Error> {
@@ -376,7 +376,7 @@ impl<'a> Config<'a> {
376376
// return the associated token address for the default address.
377377
pub(crate) async fn associated_token_address_for_token_or_override(
378378
&self,
379-
arg_matches: &ArgMatches<'_>,
379+
arg_matches: &ArgMatches,
380380
override_name: &str,
381381
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
382382
token: Option<Pubkey>,
@@ -408,7 +408,7 @@ impl<'a> Config<'a> {
408408
// address if there is one
409409
pub(crate) fn pubkey_or_default(
410410
&self,
411-
arg_matches: &ArgMatches<'_>,
411+
arg_matches: &ArgMatches,
412412
address_name: &str,
413413
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
414414
) -> Result<Pubkey, Error> {

0 commit comments

Comments
 (0)