Skip to content

Commit c3e0320

Browse files
committed
tests: time: Run cargo fmt
Format the source according to the default rules. This provides a baseline for future changes to require well-formatted source. Signed-off-by: David Brown <[email protected]>
1 parent bcfa64b commit c3e0320

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/time/src/lib.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33

44
#![no_std]
55

6-
use core::ffi::{
7-
c_char,
8-
CStr,
9-
};
6+
use core::ffi::{c_char, CStr};
107

118
use zephyr::printkln;
12-
use zephyr::time::{Duration, Instant, Tick, Timeout};
139
use zephyr::raw::k_timeout_t;
10+
use zephyr::time::{Duration, Instant, Tick, Timeout};
1411

1512
#[no_mangle]
1613
extern "C" fn rust_main() {
@@ -29,7 +26,9 @@ fn check_conversions() {
2926
break;
3027
}
3128
let name = unsafe {
32-
CStr::from_ptr(entry.name).to_str().expect("Invalid C string")
29+
CStr::from_ptr(entry.name)
30+
.to_str()
31+
.expect("Invalid C string")
3332
};
3433
printkln!("Testing: {}", name);
3534

@@ -57,8 +56,7 @@ fn check_conversions() {
5756
let value: Timeout = value.into();
5857
let c_value = unsafe { ms_to_abs_timeout(entry.uvalue) };
5958
if c_value.ticks != value.0.ticks {
60-
printkln!("Mismatch C: {}, Rust: {}",
61-
c_value.ticks, value.0.ticks);
59+
printkln!("Mismatch C: {}, Rust: {}", c_value.ticks, value.0.ticks);
6260
}
6361
assert_eq!(c_value.ticks, value.0.ticks);
6462
}

0 commit comments

Comments
 (0)