Skip to content

Commit

Permalink
remove parantheses
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos committed Aug 28, 2024
1 parent 78bcde3 commit 9ea6ce5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions staking/programs/staking/src/state/positions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ impl<'a> DynamicPositionArray<'a> {
position.get_current_position(current_epoch, unlocking_duration)?;

if position.target_with_parameters == TargetWithParameters::Voting
&& (current_state != PositionState::UNLOCKED)
&& current_state != PositionState::UNLOCKED
{
let to_slash = remaining.min(position.amount);
remaining -= to_slash;
Expand Down Expand Up @@ -1410,7 +1410,8 @@ pub mod tests {
return false;
}

if (target == &TargetWithParameters::Voting && curr_state == &PositionState::UNLOCKED)
if target == &TargetWithParameters::Voting
&& curr_state == &PositionState::UNLOCKED
&& pre_position_buckets.get(&(*target, *prev_state, *curr_state))
!= post_position_buckets.get(&(*target, *prev_state, *curr_state))
{
Expand Down

0 comments on commit 9ea6ce5

Please sign in to comment.