From 167aa60ed20ec25645722f624ea5151e6acd0ca3 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 24 Jan 2023 12:14:50 +0100 Subject: [PATCH] chore(deps): rm unused deps in downloaders (#1004) --- Cargo.lock | 2 -- crates/net/downloaders/Cargo.toml | 5 ++--- crates/net/downloaders/src/bodies/request.rs | 5 +---- crates/net/downloaders/src/lib.rs | 4 ++-- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b4df1a5cca..76cdcab626 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4126,7 +4126,6 @@ version = "0.1.0" dependencies = [ "assert_matches", "async-trait", - "backon", "futures", "futures-util", "once_cell", @@ -4134,7 +4133,6 @@ dependencies = [ "reth-eth-wire", "reth-interfaces", "reth-primitives", - "reth-rpc-types", "reth-tracing", "thiserror", "tokio", diff --git a/crates/net/downloaders/Cargo.toml b/crates/net/downloaders/Cargo.toml index a338d00aea..7db53d118b 100644 --- a/crates/net/downloaders/Cargo.toml +++ b/crates/net/downloaders/Cargo.toml @@ -11,17 +11,14 @@ description = "Implementations of various block downloaders" # reth reth-interfaces = { path = "../../interfaces" } reth-primitives = { path = "../../primitives" } -reth-rpc-types = { path = "../rpc-types" } reth-eth-wire = { path= "../eth-wire" } reth-db = { path = "../../storage/db" } # async -async-trait = "0.1.58" futures = "0.3" futures-util = "0.3.25" # misc -backon = "0.2.0" tracing = "0.1.37" thiserror = "1.0" @@ -29,6 +26,8 @@ thiserror = "1.0" reth-db = { path = "../../storage/db", features = ["test-utils"] } reth-interfaces = { path = "../../interfaces", features = ["test-utils"] } reth-tracing = { path = "../../tracing" } + +async-trait = "0.1.58" assert_matches = "1.5.0" once_cell = "1.17.0" tokio = { version = "1.21.2", features = ["full"] } diff --git a/crates/net/downloaders/src/bodies/request.rs b/crates/net/downloaders/src/bodies/request.rs index f17b723da2..dd9b49c349 100644 --- a/crates/net/downloaders/src/bodies/request.rs +++ b/crates/net/downloaders/src/bodies/request.rs @@ -250,10 +250,7 @@ mod tests { let fut = BodiesRequestFuture::new(client.clone(), Arc::new(TestConsensus::default())) .with_headers(headers.clone()); - assert_eq!( - fut.await, - headers.into_iter().map(|h| BlockResponse::Empty(h)).collect::>() - ); + assert_eq!(fut.await, headers.into_iter().map(BlockResponse::Empty).collect::>()); assert_eq!(client.times_requested(), 0); } diff --git a/crates/net/downloaders/src/lib.rs b/crates/net/downloaders/src/lib.rs index fb69b0a8e2..c38c6ba2ed 100644 --- a/crates/net/downloaders/src/lib.rs +++ b/crates/net/downloaders/src/lib.rs @@ -1,4 +1,4 @@ -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, @@ -10,7 +10,7 @@ /// The collection of algorithms for downloading block bodies. pub mod bodies; -/// The collection of alhgorithms for downloading block headers. +/// The collection of algorithms for downloading block headers. pub mod headers; #[cfg(test)]