Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kstepanovdev committed Aug 2, 2024
1 parent 213e871 commit 3552817
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub fn change_delegate(ctx: Context<ChangeDelegate>, 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
Expand All @@ -91,7 +91,7 @@ pub fn change_delegate(ctx: Context<ChangeDelegate>, 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
);
Expand Down
4 changes: 2 additions & 2 deletions programs/voter-stake-registry/src/instructions/close_voter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;

Expand Down

0 comments on commit 3552817

Please sign in to comment.