From c2ba1bfe4aadb0ba526ca5c9b21b44acac7c90aa Mon Sep 17 00:00:00 2001 From: cakevm Date: Sun, 27 Oct 2024 10:06:09 +0100 Subject: [PATCH] Fix clippy --- examples/fetch_orders.rs | 2 +- examples/fetch_orders_history.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/fetch_orders.rs b/examples/fetch_orders.rs index 0d601db..e3394a5 100644 --- a/examples/fetch_orders.rs +++ b/examples/fetch_orders.rs @@ -15,7 +15,7 @@ async fn main() { } }; - if let Some(order) = result.orders.get(0) { + if let Some(order) = result.orders.first() { println!("{:#?}", order); } else { println!("No orders found"); diff --git a/examples/fetch_orders_history.rs b/examples/fetch_orders_history.rs index 9d2e31d..e330714 100644 --- a/examples/fetch_orders_history.rs +++ b/examples/fetch_orders_history.rs @@ -42,7 +42,7 @@ async fn main() { for mut order in order_response.orders { // normalize timestamps. Not all timestamps are in seconds if order.created_at > 9999999999u64 { - order.created_at = order.created_at / 1000; + order.created_at /= 1000; } // Implement your own logic here }