Skip to content

Commit 83f0e11

Browse files
committed
zephyr: run cargo fmt
Clean up formatting Signed-off-by: David Brown <[email protected]>
1 parent e608483 commit 83f0e11

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

zephyr/src/work.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ use portable_atomic::AtomicBool;
4848
use portable_atomic_util::Arc;
4949
use zephyr_sys::{
5050
k_poll_signal, k_poll_signal_check, k_poll_signal_init, k_poll_signal_raise,
51-
k_poll_signal_reset, k_work, k_work_init, k_work_q, k_work_queue_config,
52-
k_work_queue_init, k_work_queue_start, k_work_submit, k_work_submit_to_queue,
53-
z_thread_stack_element,
51+
k_poll_signal_reset, k_work, k_work_init, k_work_q, k_work_queue_config, k_work_queue_init,
52+
k_work_queue_start, k_work_submit, k_work_submit_to_queue, z_thread_stack_element,
5453
};
5554

5655
use crate::{
@@ -421,7 +420,8 @@ impl<T: SimpleAction + Send> ArcWork<T> {
421420
let work = unsafe { self.0.work.get() };
422421
let _ = Arc::into_raw(self.0);
423422

424-
let result = SubmitResult::to_result(unsafe { k_work_submit_to_queue(queue.item.get(), work) });
423+
let result =
424+
SubmitResult::to_result(unsafe { k_work_submit_to_queue(queue.item.get(), work) });
425425

426426
Self::check_drop(work, &result);
427427

@@ -483,14 +483,15 @@ impl<T: SimpleAction + Send + 'static> StaticWork<T> {
483483

484484
/// Submit this work to the a specific work queue.
485485
pub fn submit_to_queue(self, queue: &'static WorkQueue) -> crate::Result<SubmitResult> {
486-
SubmitResult::to_result(unsafe { k_work_submit_to_queue(queue.item.get(), self.0.work.get()) })
486+
SubmitResult::to_result(unsafe {
487+
k_work_submit_to_queue(queue.item.get(), self.0.work.get())
488+
})
487489
}
488490

489491
/// The handler for static work.
490492
extern "C" fn handler(work: *mut k_work) {
491493
let ptr = unsafe {
492-
work
493-
.cast::<u8>()
494+
work.cast::<u8>()
494495
.sub(mem::offset_of!(Work<T>, work))
495496
.cast::<Work<T>>()
496497
};
@@ -529,7 +530,7 @@ impl<T: SimpleAction + Send + 'static> Work<T> {
529530
pub const fn new_static(action: T) -> Work<T> {
530531
let work = <ZephyrObject<k_work>>::new_raw();
531532

532-
unsafe {
533+
unsafe {
533534
let addr = work.get_uninit();
534535
(*addr).handler = Some(StaticWork::<T>::handler);
535536
}

0 commit comments

Comments
 (0)