Skip to content

Commit

Permalink
style: more clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
swimricky committed Oct 6, 2022
1 parent 49e04a7 commit 49bdff5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
crate::{common, decimal::U128, error::*, gen_pool_signer_seeds, invariant::Invariant, TwoPool, TOKEN_COUNT},
crate::{common, error::*, gen_pool_signer_seeds, invariant::Invariant, TwoPool, TOKEN_COUNT},
anchor_lang::prelude::*,
anchor_spl::{
associated_token::get_associated_token_address,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use {

// copied from https://github.com/CalebEverett/nftfactory/blob/master/programs/nftfactory/src/lib.rs

#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Debug, Clone)]
#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Eq, Debug, Clone)]
pub struct AnchorDataV2 {
/// The name of the asset
pub name: String,
Expand Down Expand Up @@ -58,7 +58,7 @@ pub enum AnchorUseMethod {
Single,
}

#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Debug, Clone, Copy)]
#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Eq, Debug, Clone, Copy)]
pub struct AnchorUses {
pub use_method: AnchorUseMethod,
pub remaining: u64,
Expand Down
4 changes: 2 additions & 2 deletions packages/solana-contracts/programs/two-pool/src/invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,8 @@ mod tests {
amp_factor,
lp_fee,
governance_fee,
lp_total_supply.into(),
lp_total_supply.into(),
lp_total_supply,
lp_total_supply,
)
.unwrap();
println!(
Expand Down
6 changes: 3 additions & 3 deletions packages/solana-contracts/programs/two-pool/src/pool_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ mod tests {
fn new_pool_fee2() {
let swimlake_fee_value = new_u64(0, 0);
let floored_fee = swimlake_fee_value.floor(DECIMALS);
let swimlake_u32 = (floored_fee.get_raw() * 10u64.pow((DECIMALS - floored_fee.get_decimals()) as u32)) as u32;
let _swimlake_u32 = (floored_fee.get_raw() * 10u64.pow((DECIMALS - floored_fee.get_decimals()) as u32)) as u32;
// println!("swimlake_u32: {}", swimlake_u32);
let swimlake_fee = PoolFee::new(swimlake_fee_value).unwrap();
assert_eq!(swimlake_fee_value, swimlake_fee_value.floor(DECIMALS));
Expand All @@ -85,8 +85,8 @@ mod tests {
let metapool_fee_value = new_u64(300, 6);
let metapool_fee_value2 = new_u64(3, 4);

let metapool_u32 = get_fee_u32(metapool_fee_value);
let metapool2_u32 = get_fee_u32(metapool_fee_value2);
let _metapool_u32 = get_fee_u32(metapool_fee_value);
let _metapool2_u32 = get_fee_u32(metapool_fee_value2);

// println!("metapool_u32: {}", metapool_u32);
// println!("metapool2_u32: {}", metapool2_u32);
Expand Down

0 comments on commit 49bdff5

Please sign in to comment.