Skip to content

Commit fbc4764

Browse files
committed
Fix clippy warnings
1 parent 365dea9 commit fbc4764

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

pyth-sdk-solana/examples/get_accounts.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use pyth_sdk_solana::state::{
88
load_price_account,
99
load_product_account,
1010
CorpAction,
11-
PriceStatus,
1211
PriceType,
1312
};
1413
use solana_client::rpc_client::RpcClient;
@@ -26,15 +25,6 @@ fn get_price_type(ptype: &PriceType) -> &'static str {
2625
}
2726
}
2827

29-
fn get_status(st: &PriceStatus) -> &'static str {
30-
match st {
31-
PriceStatus::Unknown => "unknown",
32-
PriceStatus::Trading => "trading",
33-
PriceStatus::Halted => "halted",
34-
PriceStatus::Auction => "auction",
35-
}
36-
}
37-
3828
fn get_corp_act(cact: &CorpAction) -> &'static str {
3929
match cact {
4030
CorpAction::NoCorpAct => "nocorpact",
@@ -56,7 +46,7 @@ fn main() {
5646
// iget and print each Product in Mapping directory
5747
let mut i = 0;
5848
for prod_pkey in &map_acct.products {
59-
let prod_data = clnt.get_account_data(&prod_pkey).unwrap();
49+
let prod_data = clnt.get_account_data(prod_pkey).unwrap();
6050
let prod_acct = load_product_account(&prod_data).unwrap();
6151

6252
// print key and reference data for this Product

pyth-sdk-solana/src/state.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ pub use pyth_sdk::{
2121
PriceFeed,
2222
};
2323

24-
use crate::VALID_SLOT_PERIOD;
25-
2624
use crate::PythError;
2725

2826
pub const MAGIC: u32 = 0xa1b2c3d4;

pyth-sdk-solana/test-contract/src/processor.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
use borsh::BorshDeserialize;
44
use solana_program::account_info::AccountInfo;
55
use solana_program::entrypoint::ProgramResult;
6-
use solana_program::program_error::ProgramError;
76
use solana_program::pubkey::Pubkey;
87

98
use crate::instruction::PythClientInstruction;
10-
use pyth_sdk_solana::state::load_price_account;
119

1210
pub fn process_instruction(
1311
_program_id: &Pubkey,

0 commit comments

Comments
 (0)