|
23 | 23 |
|
24 | 24 | use std::convert::TryFrom; |
25 | 25 | use std::env; |
| 26 | +use std::ffi::OsStr; |
26 | 27 | use std::fmt::{self, Display, Formatter, Write}; |
27 | 28 | use std::fs; |
28 | | -use std::ffi::OsStr; |
29 | 29 | use std::io::{self, ErrorKind}; |
30 | 30 | use std::mem::MaybeUninit; |
31 | 31 | #[cfg(feature = "fdstore")] |
@@ -230,10 +230,7 @@ pub unsafe fn notify_and_unset_env(state: &[NotifyState]) -> io::Result<()> { |
230 | 230 | /// let _ = sd_notify::notify_with_fds(&[NotifyState::FdStore], &[fd]); |
231 | 231 | /// ``` |
232 | 232 | #[cfg(feature = "fdstore")] |
233 | | -pub fn notify_with_fds( |
234 | | - state: &[NotifyState], |
235 | | - fds: &[BorrowedFd<'_>], |
236 | | -) -> io::Result<()> { |
| 233 | +pub fn notify_with_fds(state: &[NotifyState], fds: &[BorrowedFd<'_>]) -> io::Result<()> { |
237 | 234 | use sendfd::SendWithFd; |
238 | 235 |
|
239 | 236 | let Some(socket_path) = env::var_os(NOTIFY_SOCKET) else { |
@@ -405,7 +402,8 @@ pub fn listen_fds_with_names() -> io::Result<impl ExactSizeIterator<Item = (RawF |
405 | 402 | /// preconditions. See its safety documentation for more details. It can only |
406 | 403 | /// be safely called before threads are spawned, in particular before any |
407 | 404 | /// `tokio` runtime initialization or `#[tokio::main]`. |
408 | | -pub unsafe fn listen_fds_with_names_and_unset_env() -> io::Result<impl ExactSizeIterator<Item = (RawFd, String)>> { |
| 405 | +pub unsafe fn listen_fds_with_names_and_unset_env( |
| 406 | +) -> io::Result<impl ExactSizeIterator<Item = (RawFd, String)>> { |
409 | 407 | let result = listen_fds_with_names(); |
410 | 408 | unsafe { |
411 | 409 | env::remove_var(LISTEN_PID); |
|
0 commit comments