From 9ea6ce5af0dc36f0d60829e84ab6f7e57655b290 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 28 Aug 2024 17:47:53 +0100 Subject: [PATCH] remove parantheses --- staking/programs/staking/src/state/positions.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/staking/programs/staking/src/state/positions.rs b/staking/programs/staking/src/state/positions.rs index 9a551798..359cd449 100644 --- a/staking/programs/staking/src/state/positions.rs +++ b/staking/programs/staking/src/state/positions.rs @@ -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; @@ -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)) {