From 2bdb446390efcb74c4442eed0c788c399b8dfcc7 Mon Sep 17 00:00:00 2001 From: Martin Beckmann Date: Fri, 6 Sep 2024 08:58:18 +0200 Subject: [PATCH] [TRIVIAL] Fix clippy warnings of 1.81 (#2952) # Description Time for fixing a few lints introduced in rust 1.81 --- crates/autopilot/src/infra/persistence/mod.rs | 3 +-- crates/e2e/src/setup/services.rs | 2 +- crates/e2e/tests/e2e/ethflow.rs | 4 ++-- crates/e2e/tests/e2e/order_cancellation.rs | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/autopilot/src/infra/persistence/mod.rs b/crates/autopilot/src/infra/persistence/mod.rs index c855843eab..6cdd53914d 100644 --- a/crates/autopilot/src/infra/persistence/mod.rs +++ b/crates/autopilot/src/infra/persistence/mod.rs @@ -69,9 +69,8 @@ impl Persistence { self.postgres .replace_current_auction(&auction) .await - .map(|auction_id| { + .inspect(|&auction_id| { self.archive_auction(auction_id, auction); - auction_id }) .map_err(DatabaseError) } diff --git a/crates/e2e/src/setup/services.rs b/crates/e2e/src/setup/services.rs index 0cc2968267..7086e759b7 100644 --- a/crates/e2e/src/setup/services.rs +++ b/crates/e2e/src/setup/services.rs @@ -420,7 +420,7 @@ impl<'a> Services<'a> { ) -> Result { let quoting = self .http - .post(&format!("{API_HOST}{QUOTING_ENDPOINT}")) + .post(format!("{API_HOST}{QUOTING_ENDPOINT}")) .json("e) .send() .await diff --git a/crates/e2e/tests/e2e/ethflow.rs b/crates/e2e/tests/e2e/ethflow.rs index 4499e32001..d6f1dd50ae 100644 --- a/crates/e2e/tests/e2e/ethflow.rs +++ b/crates/e2e/tests/e2e/ethflow.rs @@ -337,7 +337,7 @@ async fn test_account_query( contracts: &Contracts, ) { let query = client - .get(&format!( + .get(format!( "{API_HOST}{ACCOUNT_ENDPOINT}/{queried_account:?}/orders", )) .send() @@ -366,7 +366,7 @@ enum TradeQuery { async fn test_trade_query(query_type: &TradeQuery, client: &Client, contracts: &Contracts) { let query = client - .get(&format!("{API_HOST}{TRADES_ENDPOINT}",)) + .get(format!("{API_HOST}{TRADES_ENDPOINT}",)) .query(&[match query_type { TradeQuery::ByUid(uid) => ("orderUid", format!("{uid:?}")), TradeQuery::ByOwner(owner) => ("owner", format!("{owner:?}")), diff --git a/crates/e2e/tests/e2e/order_cancellation.rs b/crates/e2e/tests/e2e/order_cancellation.rs index 12e69e1979..8f0ded1b07 100644 --- a/crates/e2e/tests/e2e/order_cancellation.rs +++ b/crates/e2e/tests/e2e/order_cancellation.rs @@ -127,7 +127,7 @@ async fn order_cancellation(web3: Web3) { async move { let cancellation = client - .delete(&format!("{API_HOST}{ORDERS_ENDPOINT}/{order_uid}")) + .delete(format!("{API_HOST}{ORDERS_ENDPOINT}/{order_uid}")) .json(&CancellationPayload { signature: cancellation.signature, signing_scheme: cancellation.signing_scheme, @@ -159,7 +159,7 @@ async fn order_cancellation(web3: Web3) { async move { let cancellation = client - .delete(&format!("{API_HOST}{ORDERS_ENDPOINT}")) + .delete(format!("{API_HOST}{ORDERS_ENDPOINT}")) .json(&signed_cancellations) .send() .await