Skip to content

Commit

Permalink
Add From<CoreMethodsError> for ReplMethErr
Browse files Browse the repository at this point in the history
  • Loading branch information
cowlicks committed Oct 24, 2024
1 parent 7626a17 commit 384ea8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/replication/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -56,7 +59,7 @@ pub trait ReplicationMethods: CoreInfo + Send {
fn event_subscribe(&self) -> impl Future<Output = Receiver<Event>>;
}

/// Error for ReplicationMethods trait
/// Error for CoreMethods trait
#[derive(thiserror::Error, Debug)]
pub enum CoreMethodsError {
/// Error from hypercore
Expand Down

0 comments on commit 384ea8c

Please sign in to comment.