Skip to content

Commit

Permalink
Pacify clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jan 5, 2024
1 parent 3b66af4 commit 29e4e02
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ impl Db {
account.address
)));
}
if let Some(lot) = lots.get(0) {
if let Some(lot) = lots.first() {
let mut account = account.clone();
account.remove_lot(lot.lot_number);
tracked_accounts.push((lot.clone(), account));
Expand Down
4 changes: 2 additions & 2 deletions src/kraken_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ impl ExchangeClient for KrakenExchangeClient {
if let (Some(ask_price), Some(bid_price)) = (
order_book
.asks
.get(0)
.first()
.and_then(|order_book_tier| order_book_tier.0.parse::<f64>().ok()),
order_book
.bids
.get(0)
.first()
.and_then(|order_book_tier| order_book_tier.0.parse::<f64>().ok()),
) {
return Ok(BidAsk {
Expand Down
2 changes: 1 addition & 1 deletion src/rpc_client_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub async fn get_signature_date(
signature: Signature,
) -> Result<NaiveDate, Box<dyn std::error::Error>> {
let statuses = rpc_client.get_signature_statuses_with_history(&[signature])?;
if let Some(Some(ts)) = statuses.value.get(0) {
if let Some(Some(ts)) = statuses.value.first() {
let block_date = get_block_date(rpc_client, ts.slot).await?;
Ok(block_date)
} else {
Expand Down

0 comments on commit 29e4e02

Please sign in to comment.