Skip to content

Commit 758a2c2

Browse files
committed
samples: embassy: Update formatting
Run `cargo fmt`. Signed-off-by: David Brown <[email protected]>
1 parent ac0eaac commit 758a2c2

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

samples/embassy/src/lib.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ use embassy_executor::{SendSpawner, Spawner};
1818
use embassy_sync::{blocking_mutex::raw::CriticalSectionRawMutex, channel::Channel};
1919
use log::info;
2020
use static_cell::StaticCell;
21-
use zephyr::{kconfig::CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC, kobj_define, printkln, raw::k_cycle_get_64};
2221
use zephyr::raw;
22+
use zephyr::{
23+
kconfig::CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC, kobj_define, printkln, raw::k_cycle_get_64,
24+
};
2325

2426
/// Maximum number of threads to spawn. As this is async, these do not each need a stack.
2527
const NUM_THREADS: usize = 6;
@@ -29,7 +31,7 @@ const THREAD_STACK_SIZE: usize = 2048;
2931
static EXECUTOR_LOW: StaticCell<Executor> = StaticCell::new();
3032
static EXECUTOR_MAIN: StaticCell<Executor> = StaticCell::new();
3133

32-
static LOW_SPAWNER: Channel<CriticalSectionRawMutex, SendSpawner, 1> = Channel::new() ;
34+
static LOW_SPAWNER: Channel<CriticalSectionRawMutex, SendSpawner, 1> = Channel::new();
3335

3436
// The main thread priority.
3537
const MAIN_PRIO: c_int = 2;
@@ -55,7 +57,10 @@ extern "C" fn rust_main() {
5557
low_executor();
5658
});
5759

58-
info!("Starting Embassy executor on {}", zephyr::kconfig::CONFIG_BOARD);
60+
info!(
61+
"Starting Embassy executor on {}",
62+
zephyr::kconfig::CONFIG_BOARD
63+
);
5964

6065
let executor = EXECUTOR_MAIN.init(Executor::new());
6166
executor.run(|spawner| {
@@ -81,7 +86,9 @@ async fn main(spawner: Spawner) {
8186

8287
tester.run(spawner, low_spawner, Command::Empty).await;
8388
tester.run(spawner, low_spawner, Command::Empty).await;
84-
tester.run(spawner, low_spawner, Command::PingPong(10_000)).await;
89+
tester
90+
.run(spawner, low_spawner, Command::PingPong(10_000))
91+
.await;
8592
}
8693

8794
/// Async task tests.

0 commit comments

Comments
 (0)