Skip to content

Commit 95697fc

Browse files
committed
Reformat code
1 parent 7bcbc6a commit 95697fc

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

tests/listen_fds.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ fn listen_fds() {
88
// We are not testing the success case because `fd_cloexec` would fail.
99

1010
unsafe {
11-
assert!(sd_notify::listen_fds_and_unset_env().unwrap().next().is_none());
11+
assert!(sd_notify::listen_fds_and_unset_env()
12+
.unwrap()
13+
.next()
14+
.is_none());
1215

1316
env::set_var("LISTEN_PID", "1");
1417
env::set_var("LISTEN_FDS", "1");
15-
assert!(sd_notify::listen_fds_and_unset_env().unwrap().next().is_none());
18+
assert!(sd_notify::listen_fds_and_unset_env()
19+
.unwrap()
20+
.next()
21+
.is_none());
1622
}
1723
assert!(env::var_os("LISTEN_PID").is_none());
1824
assert!(env::var_os("LISTEN_FDS").is_none());

tests/notify.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@ fn notify() {
4141
assert!(env::var_os("NOTIFY_SOCKET").is_some());
4242

4343
unsafe {
44-
sd_notify::notify_and_unset_env(
45-
&[
46-
NotifyState::Status("Reticulating splines"),
47-
NotifyState::Watchdog,
48-
NotifyState::Custom("X_WORKS=1"),
49-
],
50-
)
44+
sd_notify::notify_and_unset_env(&[
45+
NotifyState::Status("Reticulating splines"),
46+
NotifyState::Watchdog,
47+
NotifyState::Custom("X_WORKS=1"),
48+
])
5149
.unwrap();
5250
}
5351
assert_eq!(

tests/watchdog_enabled.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ fn watchdog_enabled() {
4747
env::set_var("WATCHDOG_PID", process::id().to_string());
4848
}
4949

50-
assert_eq!(sd_notify::watchdog_enabled(), Some(Duration::from_micros(5)));
50+
assert_eq!(
51+
sd_notify::watchdog_enabled(),
52+
Some(Duration::from_micros(5))
53+
);
5154
assert!(env::var_os("WATCHDOG_USEC").is_some());
5255
assert!(env::var_os("WATCHDOG_PID").is_some());
5356
}

0 commit comments

Comments
 (0)