From 3b45edacc06fb5a31ad19d2af24ab2f034ea2f31 Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 26 Apr 2022 09:54:12 -0400 Subject: [PATCH] features don't play nice with vscode development --- .../liveview/src/adapters/warp_adapter.rs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/liveview/src/adapters/warp_adapter.rs b/packages/liveview/src/adapters/warp_adapter.rs index c6ec9106f..f3cf3914b 100644 --- a/packages/liveview/src/adapters/warp_adapter.rs +++ b/packages/liveview/src/adapters/warp_adapter.rs @@ -10,17 +10,25 @@ impl crate::Liveview { pub async fn upgrade(&self, ws: warp::ws::WebSocket, app: fn(Scope) -> Element) { connect(ws, self.pool.clone(), app, ()).await; } - pub async fn upgrade_with_props(&self, ws: warp::ws::WebSocket, app: fn(Scope) -> Element, props: T) - where - T: Send + Sync + 'static + pub async fn upgrade_with_props( + &self, + ws: warp::ws::WebSocket, + app: fn(Scope) -> Element, + props: T, + ) where + T: Send + Sync + 'static, { connect(ws, self.pool.clone(), app, props).await; } } -pub async fn connect(ws: WebSocket, pool: LocalPoolHandle, app: fn(Scope) -> Element, props: T) -where - T: Send + Sync+ 'static +pub async fn connect( + ws: WebSocket, + pool: LocalPoolHandle, + app: fn(Scope) -> Element, + props: T, +) where + T: Send + Sync + 'static, { // Use a counter to assign a new unique ID for this user.