summaryrefslogtreecommitdiff
path: root/embassy-net
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-04-12 20:14:12 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-04-13 17:27:20 +0200
commit0d3758ad6bd290689c99eab029ef652176b538d7 (patch)
tree9a88d43cf5d781591c25bb8a4fafd1ac920d7b4c /embassy-net
parent2217de24c02e9f7e0aafeb8315ab6be8b644c52f (diff)
downloadembassy-0d3758ad6bd290689c99eab029ef652176b538d7.zip
net: make run() noreturn.
Diffstat (limited to 'embassy-net')
-rw-r--r--embassy-net/src/stack.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/embassy-net/src/stack.rs b/embassy-net/src/stack.rs
index f1f92e8e..8623a727 100644
--- a/embassy-net/src/stack.rs
+++ b/embassy-net/src/stack.rs
@@ -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 {