Skip to content

Commit

Permalink
Remove dyn-clone, which is no longer necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer committed Nov 12, 2024
1 parent 60f6e56 commit ea23e45
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
1 change: 0 additions & 1 deletion sequencer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 0 additions & 1 deletion types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 1 addition & 5 deletions types/src/v0/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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<T> EventConsumer for Box<T>
where
Self: Clone,
T: EventConsumer + ?Sized,
{
async fn handle_event(&self, event: &Event) -> anyhow::Result<()> {
Expand Down

0 comments on commit ea23e45

Please sign in to comment.