Skip to content

Commit

Permalink
make the AggregateManager deref blanket implementation work for all s…
Browse files Browse the repository at this point in the history
…mart pointers
  • Loading branch information
angelo-rendina-prima committed Feb 5, 2024
1 parent b79b681 commit 78116fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ pub trait EventStore {
/// `dyn` [`EventStore`]. This is particularly useful when there's the need in your codebase to have
/// a generic [`EventStore`].
#[async_trait]
impl<A, E, T> EventStore for T
impl<A, E, T, S> EventStore for T
where
A: crate::Aggregate,
A::Event: Send + Sync,
A::State: Send,
E: std::error::Error,
T: Deref<Target = dyn EventStore<Aggregate = A, Error = E> + Sync> + Sync,
S: EventStore<Aggregate = A, Error = E> + ?Sized,
T: Deref<Target = S> + Sync,
for<'a> A::Event: 'a,
{
type Aggregate = A;
Expand Down

0 comments on commit 78116fd

Please sign in to comment.