net: make run() noreturn.

This commit is contained in:
Dario Nieuwenhuis 2022-04-12 20:14:12 +02:00
parent 2217de24c0
commit 0d3758ad6b

View File

@ -230,12 +230,13 @@ pub fn is_config_up() -> bool {
STACK.borrow().borrow().as_ref().unwrap().config_up
}
pub async fn run() {
pub async fn run() -> ! {
futures::future::poll_fn(|cx| {
Stack::with(|stack| stack.poll(cx));
Poll::<()>::Pending
})
.await
.await;
unreachable!()
}
fn instant_to_smoltcp(instant: Instant) -> SmolInstant {