Tests: Fix warnings

This commit is contained in:
Christian Kamm 2022-03-01 13:49:59 +01:00
parent 2a698f3135
commit a7975d390d
3 changed files with 4 additions and 8 deletions

View File

@ -1,6 +1,5 @@
use anchor_lang::prelude::*;
use anchor_lang::solana_program::sysvar::{self, SysvarId};
use anchor_lang::Key;
use anchor_spl::token::{Token, TokenAccount};
use fixed::types::I80F48;
use solana_program::instruction::Instruction;
@ -304,7 +303,7 @@ impl<'keypair> ClientInstruction for SetStubOracle<'keypair> {
async fn to_instruction(
&self,
loader: impl ClientAccountLoader + 'async_trait,
_loader: impl ClientAccountLoader + 'async_trait,
) -> (Self::Accounts, Instruction) {
let program_id = mango_v4::id();
let instruction = Self::Instruction {
@ -339,7 +338,7 @@ impl<'keypair> ClientInstruction for CreateStubOracle<'keypair> {
async fn to_instruction(
&self,
loader: impl ClientAccountLoader + 'async_trait,
_loader: impl ClientAccountLoader + 'async_trait,
) -> (Self::Accounts, Instruction) {
let program_id = mango_v4::id();
let instruction = Self::Instruction {

View File

@ -1,5 +1,5 @@
use std::cell::RefCell;
use std::{str::FromStr, sync::Arc, sync::RwLock};
use std::{sync::Arc, sync::RwLock};
use log::*;
use solana_program::{program_option::COption, program_pack::Pack};

View File

@ -1,11 +1,8 @@
#![cfg(feature = "test-bpf")]
use fixed::types::I80F48;
use solana_program::pubkey::Pubkey;
use solana_program_test::*;
use solana_sdk::instruction::Instruction;
use solana_sdk::{signature::Keypair, signer::Signer, transport::TransportError};
use std::cmp::min;
use solana_sdk::{signature::Keypair, transport::TransportError};
use mango_v4::state::*;
use program_test::*;