chore: simplify liveview abstraction
This commit is contained in:
1 parent
44dde38c63
commit
7790d2c065
8 files changed
+142
-82
No files matched your search
@@ -45,7 +45,9 @@ async fn main() {
|
||||
.and(warp::any().map(move || view.clone()))
|
||||
.map(move |ws: Ws, view: LiveView| {
|
||||
println!("Got a connection!");
|
||||
ws.on_upgrade(|ws| view.upgrade_warp(ws, app))
|
||||
ws.on_upgrade(|ws| async move {
|
||||
let _ = view.upgrade_warp(ws, app).await;
|
||||
})
|
||||
});
|
||||
|
||||
println!("Listening on http://{}", addr);
|
||||
|
||||
Reference in new issue
Block a user