diff --git a/crates/tytix-core/src/actor.rs b/crates/tytix-core/src/actor.rs index 45fad5c..4cd968a 100644 --- a/crates/tytix-core/src/actor.rs +++ b/crates/tytix-core/src/actor.rs @@ -14,12 +14,15 @@ where type HandledMessages: MessageBundle; } -pub trait IntoActorHandle { - fn into_actor_handle(self) -> ActorHandle; +pub trait IntoActorHandle { + type HandledMessages: MessageBundle; + fn into_actor_handle(self) -> ActorHandle; } -impl IntoActorHandle for A { - fn into_actor_handle(self) -> ActorHandle { +impl IntoActorHandle for A { + type HandledMessages = A::HandledMessages; + + fn into_actor_handle(self) -> ActorHandle { ActorHandle::new(self) } }