From 3552817065f318d02c4a1d2ade50a49fdf6f5b5e Mon Sep 17 00:00:00 2001 From: Kyrylo Stepanov Date: Fri, 2 Aug 2024 15:06:22 +0300 Subject: [PATCH] clippy --- .../voter-stake-registry/src/instructions/change_delegate.rs | 4 ++-- programs/voter-stake-registry/src/instructions/close_voter.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/voter-stake-registry/src/instructions/change_delegate.rs b/programs/voter-stake-registry/src/instructions/change_delegate.rs index a66d87f6..980fe1f2 100644 --- a/programs/voter-stake-registry/src/instructions/change_delegate.rs +++ b/programs/voter-stake-registry/src/instructions/change_delegate.rs @@ -82,7 +82,7 @@ pub fn change_delegate(ctx: Context, deposit_entry_index: u8) -> MplStakingError::DelegateUpdateIsTooSoon ); - if &ctx.accounts.voter.key() == &ctx.accounts.delegate_voter.key() { + if ctx.accounts.voter.key() == ctx.accounts.delegate_voter.key() { require!( target.delegate != voter_authority, MplStakingError::SameDelegate @@ -91,7 +91,7 @@ pub fn change_delegate(ctx: Context, deposit_entry_index: u8) -> } else { let delegate_voter = &ctx.accounts.delegate_voter.load()?; require!( - &ctx.accounts.voter.key() != &ctx.accounts.delegate_voter.key() + ctx.accounts.voter.key() != ctx.accounts.delegate_voter.key() && delegate_voter.voter_authority != target.delegate, MplStakingError::SameDelegate ); diff --git a/programs/voter-stake-registry/src/instructions/close_voter.rs b/programs/voter-stake-registry/src/instructions/close_voter.rs index fb469ac7..57de046b 100644 --- a/programs/voter-stake-registry/src/instructions/close_voter.rs +++ b/programs/voter-stake-registry/src/instructions/close_voter.rs @@ -56,8 +56,8 @@ pub struct CloseVoter<'info> { /// Closes the voter account, transfers all funds from token accounts and closes vaults. /// Only accounts with no remaining lockups can be closed. /// remaining_accounts: All voter vaults followed by target token accounts, in order. -pub fn close_voter<'key, 'accounts, 'remaining, 'info>( - ctx: Context<'key, 'accounts, 'remaining, 'info, CloseVoter<'info>>, +pub fn close_voter<'info>( + ctx: Context<'_, '_, '_, 'info, CloseVoter<'info>>, ) -> Result<()> { let registrar = ctx.accounts.registrar.load()?;