From ea23e451594dd98129610123af54029b8952b3df Mon Sep 17 00:00:00 2001 From: Jeb Bearer Date: Mon, 4 Nov 2024 15:55:56 -0800 Subject: [PATCH] Remove dyn-clone, which is no longer necessary --- Cargo.lock | 2 -- Cargo.toml | 1 - sequencer/Cargo.toml | 1 - types/Cargo.toml | 1 - types/src/v0/traits.rs | 6 +----- 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eca09cf12..9177c9237 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2853,7 +2853,6 @@ dependencies = [ "committable", "contract-bindings", "derive_more 1.0.0", - "dyn-clone", "ethers", "fluent-asserter", "futures", @@ -8668,7 +8667,6 @@ dependencies = [ "derivative", "derive_more 1.0.0", "dotenvy", - "dyn-clone", "escargot", "espresso-macros", "espresso-types", diff --git a/Cargo.toml b/Cargo.toml index 8ee6a0ed2..030ee3ed2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,6 @@ cld = "0.5" derive_more = { version = "1.0", features = ["full"] } es-version = { git = "https://github.com/EspressoSystems/es-version.git", branch = "main" } dotenvy = "0.15" -dyn-clone = "1.0" ethers = { version = "2.0", features = ["solc", "ws"] } futures = "0.3" tokio = { version = "1", default-features = false, features = [ diff --git a/sequencer/Cargo.toml b/sequencer/Cargo.toml index 051135626..72d81369f 100644 --- a/sequencer/Cargo.toml +++ b/sequencer/Cargo.toml @@ -53,7 +53,6 @@ csv = "1" derivative = "2.2" derive_more = { workspace = true } dotenvy = { workspace = true } -dyn-clone = { workspace = true } espresso-types = { path = "../types", features = ["testing"] } ethers = { workspace = true } futures = { workspace = true } diff --git a/types/Cargo.toml b/types/Cargo.toml index 35bb9593f..23c5bfed0 100644 --- a/types/Cargo.toml +++ b/types/Cargo.toml @@ -22,7 +22,6 @@ cld = { workspace = true } committable = { workspace = true } contract-bindings = { path = "../contract-bindings" } derive_more = { workspace = true } -dyn-clone = { workspace = true } ethers = { workspace = true } fluent-asserter = "0.1.9" futures = { workspace = true } diff --git a/types/src/v0/traits.rs b/types/src/v0/traits.rs index a9221bd9f..1672f8bd5 100644 --- a/types/src/v0/traits.rs +++ b/types/src/v0/traits.rs @@ -5,7 +5,6 @@ use std::{cmp::max, collections::BTreeMap, fmt::Debug, ops::Range, sync::Arc}; use anyhow::{bail, ensure, Context}; use async_trait::async_trait; use committable::Commitment; -use dyn_clone::DynClone; use futures::{FutureExt, TryFutureExt}; use hotshot::{types::EventType, HotShotInitializer}; use hotshot_types::{ @@ -642,16 +641,13 @@ pub trait SequencerPersistence: Sized + Send + Sync + 'static { } #[async_trait] -pub trait EventConsumer: Debug + DynClone + Send + Sync { +pub trait EventConsumer: Debug + Send + Sync { async fn handle_event(&self, event: &Event) -> anyhow::Result<()>; } -dyn_clone::clone_trait_object!(EventConsumer); - #[async_trait] impl EventConsumer for Box where - Self: Clone, T: EventConsumer + ?Sized, { async fn handle_event(&self, event: &Event) -> anyhow::Result<()> {