Skip to content

Commit 6eafb00

Browse files
committed
fmt
1 parent 60baacd commit 6eafb00

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/use_file.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ fn get_rng_fd() -> Result<libc::c_int, Error> {
4545
match FD.load(Ordering::Acquire) {
4646
FD_UNINIT => {}
4747
FD_ONGOING_INIT => {
48-
let rqtp = libc::timespec { tv_sec: 0, tv_nsec: timeout_ns };
49-
let mut rmtp = libc::timespec { tv_sec: 0, tv_nsec: 0 };
48+
let rqtp = libc::timespec {
49+
tv_sec: 0,
50+
tv_nsec: timeout_ns,
51+
};
52+
let mut rmtp = libc::timespec {
53+
tv_sec: 0,
54+
tv_nsec: 0,
55+
};
5056
unsafe {
5157
libc::nanosleep(&rqtp, &mut rmtp);
5258
}
@@ -80,7 +86,7 @@ fn get_rng_fd() -> Result<libc::c_int, Error> {
8086
}
8187
}
8288

83-
fn open_fd()-> Result<libc::c_int, Error> {
89+
fn open_fd() -> Result<libc::c_int, Error> {
8490
// On Linux, /dev/urandom might return insecure values.
8591
#[cfg(any(target_os = "android", target_os = "linux"))]
8692
wait_until_rng_ready()?;

0 commit comments

Comments
 (0)