Skip to content

Commit

Permalink
Make trait bound more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 27, 2023
1 parent 89d489f commit 9f5c136
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/fj-kernel/src/services/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ where
}
}

impl<S: State> Subscriber<S::Command> for Service<S> {
impl<S: State> Subscriber<S::Command> for Service<S>
where
S::Command: Clone,
{
fn handle_event(&mut self, event: &S::Command) {
self.execute(event.clone());
}
Expand All @@ -113,7 +116,7 @@ pub trait State {
/// A command that relates to the state
///
/// Commands are processed by [`State::decide`].
type Command: Clone;
type Command;

/// An event that captures modifications to this state
///
Expand Down

0 comments on commit 9f5c136

Please sign in to comment.