chore(clippy)
This commit is contained in:
parent
89dda462ff
commit
d6bd9242ca
|
@ -230,14 +230,14 @@ impl FileDescriptor {
|
|||
|
||||
fn from_fd_offset(fd_offset: usize) -> Result<Self, DupError> {
|
||||
SD_LISTEN_FDS_START
|
||||
.checked_add(fd_offset as RawFd)
|
||||
.map(|fd| {
|
||||
// SAFETY: The file descriptor won't be closed by the time we duplicate it.
|
||||
let fd = unsafe { BorrowedFd::borrow_raw(fd) };
|
||||
rustix::fs::fcntl_dupfd_cloexec(fd, 0).map_err(DupError::from)
|
||||
})
|
||||
.expect("Already checked against overflow.")
|
||||
.map(Self::from_fd)
|
||||
.checked_add(fd_offset as RawFd)
|
||||
.map(|fd| {
|
||||
// SAFETY: The file descriptor won't be closed by the time we duplicate it.
|
||||
let fd = unsafe { BorrowedFd::borrow_raw(fd) };
|
||||
rustix::fs::fcntl_dupfd_cloexec(fd, 0).map_err(DupError::from)
|
||||
})
|
||||
.expect("Already checked against overflow.")
|
||||
.map(Self::from_fd)
|
||||
}
|
||||
|
||||
fn from_fds(
|
||||
|
|
|
@ -209,6 +209,7 @@ impl Notifier {
|
|||
/// This is created by [`Notifier::guard`].
|
||||
///
|
||||
/// Do note that this guard's [`Drop`] implementation will block for the provided timeout and ignore all errors returned by [`barrier()`](Self::barrier).
|
||||
#[must_use = "if unused the synchronization will happen immediately"]
|
||||
pub struct NotifyBarrierGuard<'a> {
|
||||
notifier: &'a Notifier,
|
||||
timeout: types::BarrierTimeout,
|
||||
|
|
Loading…
Reference in a new issue