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

Commit 145285f

Browse files
committed
remove lifetime parameters from ArgMatches
1 parent fd6ee0e commit 145285f

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

34123412
pub async fn process_command<'a>(
34133413
sub_command: &CommandName,
3414-
sub_matches: &ArgMatches<'_>,
3414+
sub_matches: &ArgMatches,
34153415
config: &Config<'a>,
34163416
mut wallet_manager: Option<Rc<RemoteWalletManager>>,
34173417
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>> {
@@ -71,7 +71,7 @@ pub struct Config<'a> {
7171

7272
impl<'a> Config<'a> {
7373
pub async fn new(
74-
matches: &ArgMatches<'_>,
74+
matches: &ArgMatches,
7575
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
7676
bulk_signers: &mut Vec<Arc<dyn Signer>>,
7777
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -122,7 +122,7 @@ impl<'a> Config<'a> {
122122
}
123123

124124
fn extract_multisig_signers(
125-
matches: &ArgMatches<'_>,
125+
matches: &ArgMatches,
126126
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
127127
bulk_signers: &mut Vec<Arc<dyn Signer>>,
128128
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -142,7 +142,7 @@ impl<'a> Config<'a> {
142142
}
143143

144144
pub async fn new_with_clients_and_ws_url(
145-
matches: &ArgMatches<'_>,
145+
matches: &ArgMatches,
146146
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
147147
bulk_signers: &mut Vec<Arc<dyn Signer>>,
148148
multisigner_ids: &'a mut Vec<Pubkey>,
@@ -325,7 +325,7 @@ impl<'a> Config<'a> {
325325
// return the associated token address for the default address.
326326
pub(crate) async fn associated_token_address_or_override(
327327
&self,
328-
arg_matches: &ArgMatches<'_>,
328+
arg_matches: &ArgMatches,
329329
override_name: &str,
330330
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
331331
) -> Result<Pubkey, Error> {
@@ -344,7 +344,7 @@ impl<'a> Config<'a> {
344344
// return the associated token address for the default address.
345345
pub(crate) async fn associated_token_address_for_token_or_override(
346346
&self,
347-
arg_matches: &ArgMatches<'_>,
347+
arg_matches: &ArgMatches,
348348
override_name: &str,
349349
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
350350
token: Option<Pubkey>,
@@ -376,7 +376,7 @@ impl<'a> Config<'a> {
376376
// address if there is one
377377
pub(crate) fn pubkey_or_default(
378378
&self,
379-
arg_matches: &ArgMatches<'_>,
379+
arg_matches: &ArgMatches,
380380
address_name: &str,
381381
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
382382
) -> Result<Pubkey, Error> {

0 commit comments

Comments
 (0)