chore: simplify liveview abstraction

This commit is contained in:
Jonathan Kelley committed 2022-12-15 18:46:59 -08:00
1 parent 44dde38c63
commit 7790d2c065
8 files changed
+142 -82

No files matched your search

+3 -1
View File
@@ -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);