Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos committed Oct 17, 2023
1 parent 90e954c commit 6a15e5d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions staking/programs/staking/src/state/positions.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use {
super::target,
crate::error::ErrorCode,
anchor_lang::{
prelude::{
Expand All @@ -12,10 +11,7 @@ use {
},
},
std::{
convert::{
TryFrom,
TryInto,
},
convert::TryInto,
fmt::{
self,
Debug,
Expand Down Expand Up @@ -149,7 +145,7 @@ impl PositionData {
let mut excess_governance_exposure =
governance_exposure.saturating_sub(remaining_amount);

while (excess_governance_exposure > 0 && *src_next_index > 0) {
while excess_governance_exposure > 0 && *src_next_index > 0 {
let index = TryInto::<usize>::try_into(*src_next_index - 1)
.map_err(|_| ErrorCode::GenericOverflow)?;
match self.read_position(index)? {
Expand Down

0 comments on commit 6a15e5d

Please sign in to comment.