Skip to content

Commit

Permalink
Make cargo clippy happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Nov 4, 2024
1 parent 3fbba7f commit 2d7347f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cargo-registry/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ pub(crate) struct Client {
}

impl Client {
pub fn get_cli_config<'a>(&'a self) -> CliConfig<'a> {
pub fn get_cli_config(&'_ self) -> CliConfig<'_> {
CliConfig {
websocket_url: self.websocket_url.clone(),
commitment: self.commitment.clone(),
commitment: self.commitment,
signers: vec![&self.cli_signers[0], &self.cli_signers[1]],
..CliConfig::default()
}
Expand Down
16 changes: 8 additions & 8 deletions cli/src/program_v4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ pub fn process_program_v4_subcommand(
.map_err(|err| format!("Unable to read program file: {err}"))?;
process_deploy_program(
rpc_client,
&config,
config,
authority_signer_index,
&program_address
.unwrap_or_else(|| config.signers[program_signer_index.unwrap()].pubkey()),
Expand All @@ -513,14 +513,14 @@ pub fn process_program_v4_subcommand(
ProgramV4CliCommand::Undeploy {
program_address,
authority_signer_index,
} => process_undeploy_program(rpc_client, &config, authority_signer_index, program_address),
} => process_undeploy_program(rpc_client, config, authority_signer_index, program_address),
ProgramV4CliCommand::TransferAuthority {
program_address,
authority_signer_index,
new_authority_signer_index,
} => process_transfer_authority_of_program(
rpc_client,
&config,
config,
authority_signer_index,
program_address,
config.signers[*new_authority_signer_index],
Expand All @@ -531,7 +531,7 @@ pub fn process_program_v4_subcommand(
next_version_signer_index,
} => process_finalize_program(
rpc_client,
&config,
config,
authority_signer_index,
program_address,
config.signers[*next_version_signer_index],
Expand All @@ -540,11 +540,11 @@ pub fn process_program_v4_subcommand(
account_pubkey,
authority,
all,
} => process_show(rpc_client, &config, *account_pubkey, *authority, *all),
} => process_show(rpc_client, config, *account_pubkey, *authority, *all),
ProgramV4CliCommand::Dump {
account_pubkey,
output_location,
} => process_dump(rpc_client, &config, *account_pubkey, output_location),
} => process_dump(rpc_client, config, *account_pubkey, output_location),
}
}

Expand Down Expand Up @@ -624,7 +624,7 @@ pub fn process_deploy_program(
program_data.len(),
);
let executable =
Executable::<InvokeContext>::from_elf(&program_data, Arc::new(program_runtime_environment))
Executable::<InvokeContext>::from_elf(program_data, Arc::new(program_runtime_environment))
.map_err(|err| format!("ELF error: {err}"))?;
executable
.verify::<RequisiteVerifier>()
Expand All @@ -643,7 +643,7 @@ pub fn process_deploy_program(
}

let lamports_required = rpc_client.get_minimum_balance_for_rent_exemption(
LoaderV4State::program_data_offset().saturating_add(program_data.len() as usize),
LoaderV4State::program_data_offset().saturating_add(program_data.len()),
)?;
let (buffer_address, buffer_account) = if let Some(buffer_signer) = buffer_signer {
// Deploy new program or redeploy with a buffer account
Expand Down

0 comments on commit 2d7347f

Please sign in to comment.