Skip to content

Commit

Permalink
refactor: Remove unused constraint, make `type InvocationStoreError: …
Browse files Browse the repository at this point in the history
…Debug`
  • Loading branch information
matheus23 committed Mar 26, 2024
1 parent a9f318c commit 88ce308
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions src/invocation/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ where
D: delegation::store::Store<DID, V, C>,
V: varsig::Header<C> + Clone,
C: Codec,
<S as Store<T, DID, V, C>>::InvocationStoreError: fmt::Debug,
<D as delegation::store::Store<DID, V, C>>::DelegationStoreError: fmt::Debug,
delegation::Payload<DID>: TryFrom<Named<Ipld>>,
Named<Ipld>: From<delegation::Payload<DID>>,
{
Expand Down Expand Up @@ -291,10 +289,7 @@ pub enum Recipient<T> {
}

#[derive(Debug, Error, EnumAsInner)]
pub enum ReceiveError<T, DID: Did, D, S: Store<T, DID, V, C>, V: varsig::Header<C>, C: Codec>
where
<S as Store<T, DID, V, C>>::InvocationStoreError: fmt::Debug,
{
pub enum ReceiveError<T, DID: Did, D, S: Store<T, DID, V, C>, V: varsig::Header<C>, C: Codec> {
#[error("couldn't find delegation: {0}")]
DelegationNotFound(Cid),

Expand Down
4 changes: 2 additions & 2 deletions src/invocation/store/traits.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::{crypto::varsig, did::Did, invocation::Invocation};
use libipld_core::{cid::Cid, codec::Codec};
use std::sync::Arc;
use std::{fmt::Debug, sync::Arc};

pub trait Store<T, DID: Did, V: varsig::Header<C>, C: Codec> {
type InvocationStoreError;
type InvocationStoreError: Debug;

fn get(
&self,
Expand Down

0 comments on commit 88ce308

Please sign in to comment.