Browse Source

features don't play nice with vscode development

Ian 3 năm trước cách đây
mục cha
commit
3b45edacc0
1 tập tin đã thay đổi với 14 bổ sung6 xóa
  1. 14 6
      packages/liveview/src/adapters/warp_adapter.rs

+ 14 - 6
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<T>(&self, ws: warp::ws::WebSocket, app: fn(Scope<T>) -> Element, props: T) 
-    where 
-        T: Send + Sync + 'static 
+    pub async fn upgrade_with_props<T>(
+        &self,
+        ws: warp::ws::WebSocket,
+        app: fn(Scope<T>) -> Element,
+        props: T,
+    ) where
+        T: Send + Sync + 'static,
     {
         connect(ws, self.pool.clone(), app, props).await;
     }
 }
 
-pub async fn connect<T>(ws: WebSocket, pool: LocalPoolHandle, app: fn(Scope<T>) -> Element, props: T) 
-where 
-    T: Send + Sync+  'static 
+pub async fn connect<T>(
+    ws: WebSocket,
+    pool: LocalPoolHandle,
+    app: fn(Scope<T>) -> Element,
+    props: T,
+) where
+    T: Send + Sync + 'static,
 {
     // Use a counter to assign a new unique ID for this user.