Skip to content

Commit 13881ba

Browse files
committed
web: use async syntax
1 parent 86f990d commit 13881ba

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

bitbox-bridge/src/web.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,7 @@ async fn ws_upgrade(
155155
}))
156156
}
157157

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

@@ -322,5 +318,5 @@ pub fn create(
322318
}
323319
}
324320
});
325-
warp::serve(routes).run(addr)
321+
warp::serve(routes).run(addr).await
326322
}

0 commit comments

Comments
 (0)