Skip to content

Commit

Permalink
web: use async syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Jun 29, 2024
1 parent 86f990d commit 13881ba
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bitbox-bridge/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,7 @@ async fn ws_upgrade(
}))
}

pub fn create(
usb_devices: UsbDevices,
notify_tx: mpsc::Sender<()>,
addr: SocketAddr,
) -> impl std::future::Future {
pub async fn create(usb_devices: UsbDevices, notify_tx: mpsc::Sender<()>, addr: SocketAddr) {
// create a warp filter out of "usb_devices" to pass it into our handlers later
let usb_devices = warp::any().map(move || (usb_devices.clone(), notify_tx.clone()));

Expand Down Expand Up @@ -322,5 +318,5 @@ pub fn create(
}
}
});
warp::serve(routes).run(addr)
warp::serve(routes).run(addr).await
}

0 comments on commit 13881ba

Please sign in to comment.