diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-07-09 01:49:31 +0200 |
|---|---|---|
| committer | diondokter <[email protected]> | 2025-08-29 13:23:21 +0200 |
| commit | 8aec341f28a00012e1771d5c35d2647e11830755 (patch) | |
| tree | 28ec3bad05e5dcb6ec949493688111839bb6865b /examples/std/src/bin/net_ppp.rs | |
| parent | 34ff67cdbf25e278ff99bd4a05b6b8c6a30fa5d1 (diff) | |
executor: return error when creating the spawntoken, not when spawning.
Diffstat (limited to 'examples/std/src/bin/net_ppp.rs')
| -rw-r--r-- | examples/std/src/bin/net_ppp.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/std/src/bin/net_ppp.rs b/examples/std/src/bin/net_ppp.rs index ac3aea6ff..82272c798 100644 --- a/examples/std/src/bin/net_ppp.rs +++ b/examples/std/src/bin/net_ppp.rs | |||
| @@ -102,8 +102,8 @@ async fn main_task(spawner: Spawner) { | |||
| 102 | ); | 102 | ); |
| 103 | 103 | ||
| 104 | // Launch network task | 104 | // Launch network task |
| 105 | spawner.spawn(net_task(net_runner)).unwrap(); | 105 | spawner.spawn(net_task(net_runner).unwrap()); |
| 106 | spawner.spawn(ppp_task(stack, runner, port)).unwrap(); | 106 | spawner.spawn(ppp_task(stack, runner, port).unwrap()); |
| 107 | 107 | ||
| 108 | // Then we can use it! | 108 | // Then we can use it! |
| 109 | let mut rx_buffer = [0; 4096]; | 109 | let mut rx_buffer = [0; 4096]; |
| @@ -160,6 +160,6 @@ fn main() { | |||
| 160 | 160 | ||
| 161 | let executor = EXECUTOR.init(Executor::new()); | 161 | let executor = EXECUTOR.init(Executor::new()); |
| 162 | executor.run(|spawner| { | 162 | executor.run(|spawner| { |
| 163 | spawner.spawn(main_task(spawner)).unwrap(); | 163 | spawner.spawn(main_task(spawner).unwrap()); |
| 164 | }); | 164 | }); |
| 165 | } | 165 | } |
