chore: Make Clippy happy
This commit is contained in:
parent
367c43491f
commit
dd6be5bef8
|
@ -50,7 +50,7 @@ pub fn log_voter_info(
|
|||
let voting_mint_config = ®istrar.voting_mints[deposit.voting_mint_config_idx as usize];
|
||||
let locking_info = (seconds_left > 0).then(|| LockingInfo {
|
||||
amount: deposit.amount_locked(curr_ts),
|
||||
end_timestamp: (lockup.kind != LockupKind::Constant).then(|| end_ts),
|
||||
end_timestamp: (lockup.kind != LockupKind::Constant).then_some(end_ts),
|
||||
vesting: lockup.kind.is_vesting().then(|| VestingInfo {
|
||||
rate: deposit
|
||||
.amount_initially_locked_native
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![allow(clippy::result_large_err)]
|
||||
|
||||
use anchor_lang::prelude::*;
|
||||
use instructions::*;
|
||||
use state::*;
|
||||
|
@ -120,6 +122,7 @@ pub mod voter_stake_registry {
|
|||
instructions::withdraw(ctx, deposit_entry_index, amount)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn grant(
|
||||
ctx: Context<Grant>,
|
||||
voter_bump: u8,
|
||||
|
|
|
@ -145,7 +145,7 @@ impl DepositEntry {
|
|||
max_locked_vote_weight: u64,
|
||||
lockup_saturation_secs: u64,
|
||||
) -> Result<u64> {
|
||||
let mut altered = self.clone();
|
||||
let mut altered = *self;
|
||||
|
||||
// Trigger the unlock phase for constant lockups
|
||||
if self.lockup.kind == LockupKind::Constant {
|
||||
|
|
|
@ -163,7 +163,7 @@ impl Lockup {
|
|||
}
|
||||
|
||||
#[repr(u8)]
|
||||
#[derive(AnchorSerialize, AnchorDeserialize, Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(AnchorSerialize, AnchorDeserialize, Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum LockupKind {
|
||||
/// No lockup, tokens can be withdrawn as long as not engaged in a proposal.
|
||||
None,
|
||||
|
|
Loading…
Reference in New Issue