Skip to content

Commit 3544415

Browse files
committed
refactor: clippy auto fixes
Signed-off-by: Alexis Asseman <[email protected]>
1 parent 91b2564 commit 3544415

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

tap_aggregator/src/aggregator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ mod tests {
149149
.await
150150
.unwrap();
151151
receipts.push(receipt.clone());
152-
receipts.push(receipt.clone());
152+
receipts.push(receipt);
153153

154154
let res = aggregator::check_signatures_unique(&receipts);
155155
assert!(res.is_err());

tap_aggregator/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use clap::Parser;
88
use ethers_signers::{coins_bip39::English, MnemonicBuilder};
99
use tokio::signal::unix::{signal, SignalKind};
1010

11-
use log::{debug, info, warn};
11+
use log::{debug, info};
1212
use tap_aggregator::metrics;
1313
use tap_aggregator::server;
1414

tap_core/src/adapters/test/receipt_checks_adapter_test.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ mod receipt_checks_adapter_unit_test {
6868
.await;
6969
let receipt_storage = Arc::new(RwLock::new(receipts));
7070

71-
let query_appraisals = (0..11)
72-
.into_iter()
73-
.map(|id| (id, 100u128))
74-
.collect::<HashMap<_, _>>();
71+
let query_appraisals = (0..11).map(|id| (id, 100u128)).collect::<HashMap<_, _>>();
7572

7673
let query_appraisals_storage = Arc::new(RwLock::new(query_appraisals));
7774

tap_integration_tests/tests/indexer_mock/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl<
9696
receipt_count: Arc::new(AtomicU64::new(0)),
9797
threshold,
9898
aggregator_client: (
99-
HttpClientBuilder::default().build(format!("{}", aggregate_server_address))?,
99+
HttpClientBuilder::default().build(aggregate_server_address.to_string())?,
100100
aggregate_server_api_version,
101101
),
102102
})
@@ -234,8 +234,7 @@ async fn request_rav<
234234
.await?;
235235
{
236236
let mut manager_guard = manager.lock().await;
237-
let _result =
238-
manager_guard.verify_and_store_rav(rav_request.expected_rav, remote_rav_result.data)?;
237+
manager_guard.verify_and_store_rav(rav_request.expected_rav, remote_rav_result.data)?;
239238
}
240239

241240
// For these tests, we expect every receipt to be valid, i.e. there should be no invalid receipts, nor any missing receipts (less than the expected threshold).
@@ -259,5 +258,5 @@ fn get_current_timestamp_u64_ns() -> Result<u64> {
259258
}
260259

261260
fn to_rpc_error(e: Box<dyn std::error::Error>, msg: &str) -> jsonrpsee::types::ErrorObjectOwned {
262-
jsonrpsee::types::ErrorObject::owned(-32000, format!("{} - {}", e.to_string(), msg), None::<()>)
261+
jsonrpsee::types::ErrorObject::owned(-32000, format!("{} - {}", e, msg), None::<()>)
263262
}

tap_integration_tests/tests/showcase.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,8 +796,7 @@ async fn test_tap_aggregator_rav_timestamp_cuttoff(
796796
http_max_concurrent_connections,
797797
)
798798
.await?;
799-
let client =
800-
HttpClientBuilder::default().build(format!("http://{}", gateway_addr.to_string()))?;
799+
let client = HttpClientBuilder::default().build(format!("http://{}", gateway_addr))?;
801800

802801
// This is the first part of the test, two batches of receipts are sent to the aggregator.
803802
// The second batch has one receipt with the same timestamp as the latest receipt in the first batch.

0 commit comments

Comments
 (0)