diff --git a/nakago_ws/src/controller.rs b/nakago_ws/src/controller.rs index 571ece7..7e5efac 100644 --- a/nakago_ws/src/controller.rs +++ b/nakago_ws/src/controller.rs @@ -103,14 +103,14 @@ impl Controller { /// Provide a new WebSocket Event Controller #[derive(Default, new)] -pub struct Provide { - connections_tag: Option<&'static Tag>>, - handler_tag: Option<&'static Tag>>>, +pub struct Provide { + connections_tag: Option<&'static Tag>>, + handler_tag: Option<&'static Tag>>>, } -impl Provide { +impl Provide { /// Set a Tag for the Connections instance this Provider requires - pub fn with_connections_tag(self, connections_tag: &'static Tag>) -> Self { + pub fn with_connections_tag(self, connections_tag: &'static Tag>) -> Self { Self { connections_tag: Some(connections_tag), ..self @@ -118,7 +118,7 @@ impl Provide { } /// Set a Tag for the Handler instance this Provider requires - pub fn with_handler_tag(self, handler_tag: &'static Tag>>) -> Self { + pub fn with_handler_tag(self, handler_tag: &'static Tag>>) -> Self { Self { handler_tag: Some(handler_tag), ..self @@ -128,21 +128,21 @@ impl Provide { #[Provider] #[async_trait] -impl Provider> for Provide +impl Provider> for Provide where - U: Send + Sync + Any, + Session: Send + Sync + Any, { - async fn provide(self: Arc, i: Inject) -> provider::Result>> { + async fn provide(self: Arc, i: Inject) -> provider::Result>> { let connections = if let Some(tag) = self.connections_tag { i.get_tag(tag).await? } else { - i.get::>().await? + i.get::>().await? }; let handler = if let Some(tag) = self.handler_tag { i.get_tag(tag).await? } else { - i.get::>>().await? + i.get::>>().await? }; Ok(Arc::new(Controller::new(connections, handler)))