Skip to content

Commit 3a6f3a1

Browse files
committed
samples: bench: Clean up formatting
Run rustfmt to clean up formatting of the code. Signed-off-by: David Brown <[email protected]>
1 parent 96fac0a commit 3a6f3a1

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

samples/bench/src/lib.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ impl ThreadTests {
161161

162162
let mut thread_commands = Vec::new();
163163

164-
static SEMS: [StaticCell<Semaphore>; NUM_THREADS] = [const { StaticCell::new() }; NUM_THREADS];
165-
static BACK_SEMS: [StaticCell<Semaphore>; NUM_THREADS] = [const { StaticCell::new() }; NUM_THREADS];
164+
static SEMS: [StaticCell<Semaphore>; NUM_THREADS] =
165+
[const { StaticCell::new() }; NUM_THREADS];
166+
static BACK_SEMS: [StaticCell<Semaphore>; NUM_THREADS] =
167+
[const { StaticCell::new() }; NUM_THREADS];
166168

167169
for i in 0..count {
168170
let sem = SEMS[i].init(Semaphore::new(0, u32::MAX));
@@ -364,12 +366,7 @@ impl ThreadTests {
364366

365367
Command::SimpleSemYieldAsync(count) => {
366368
spawn(
367-
Self::simple_sem_yield_async(
368-
this.clone(),
369-
id,
370-
this.sems[id],
371-
count,
372-
),
369+
Self::simple_sem_yield_async(this.clone(), id, this.sems[id], count),
373370
&this.workq,
374371
c"worker",
375372
);
@@ -484,7 +481,12 @@ impl ThreadTests {
484481
.unwrap();
485482
}
486483

487-
async fn simple_sem_yield_async(this: Arc<Self>, id: usize, sem: &'static Semaphore, count: usize) {
484+
async fn simple_sem_yield_async(
485+
this: Arc<Self>,
486+
id: usize,
487+
sem: &'static Semaphore,
488+
count: usize,
489+
) {
488490
for _ in 0..count {
489491
sem.give();
490492
sem.take_async(NoWait).await.unwrap();

0 commit comments

Comments
 (0)