Skip to content

Commit

Permalink
tests: Unwrap certain results
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Aug 21, 2024
1 parent 22ebf56 commit 5d979a3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/ztimer-async/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ fn main() -> ! {
static_cell::StaticCell::new();
let executor: &'static mut _ = EXECUTOR.init(embassy_executor_riot::Executor::new());
executor.run(|spawner| {
spawner.spawn(amain(spawner));
spawner
.spawn(amain(spawner))
.expect("Task did not get spawned before");
})
}

Expand All @@ -38,8 +40,12 @@ async fn amain(spawner: embassy_executor::Spawner) {
drop(locked);
println!("And now for something more complex...");

spawner.spawn(ten_tenths());
spawner.spawn(five_fifths());
spawner
.spawn(ten_tenths())
.expect("Task did not get spawned before");
spawner
.spawn(five_fifths())
.expect("Task did not get spawned before");
}

#[embassy_executor::task]
Expand Down

0 comments on commit 5d979a3

Please sign in to comment.