From 384ea8cd569163dd310b6c930c0e5f1defa04183 Mon Sep 17 00:00:00 2001 From: Blake Griffith Date: Wed, 23 Oct 2024 13:12:08 -0400 Subject: [PATCH] Add From for ReplMethErr --- src/replication/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/replication/mod.rs b/src/replication/mod.rs index 5caf9ae..e48d6c3 100644 --- a/src/replication/mod.rs +++ b/src/replication/mod.rs @@ -30,6 +30,9 @@ pub enum ReplicationMethodsError { /// Error from hypercore #[error("Got a hypercore error: [{0}]")] HypercoreError(#[from] HypercoreError), + /// Error from CoreMethods + #[error("Got a CoreMethods error: [{0}]")] + CoreMethodsError(#[from] CoreMethodsError), } /// Methods needed for replication @@ -56,7 +59,7 @@ pub trait ReplicationMethods: CoreInfo + Send { fn event_subscribe(&self) -> impl Future>; } -/// Error for ReplicationMethods trait +/// Error for CoreMethods trait #[derive(thiserror::Error, Debug)] pub enum CoreMethodsError { /// Error from hypercore