Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix elided_lifetimes_in_paths warnings. #1141

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/backend/libc/event/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ pub(crate) fn epoll_create(flags: super::epoll::CreateFlags) -> io::Result<Owned
#[cfg(any(linux_kernel, target_os = "redox"))]
pub(crate) fn epoll_add(
epoll: BorrowedFd<'_>,
source: BorrowedFd,
source: BorrowedFd<'_>,
event: &crate::event::epoll::Event,
) -> io::Result<()> {
// We use our own `Event` struct instead of libc's because
Expand All @@ -221,7 +221,7 @@ pub(crate) fn epoll_add(
#[cfg(any(linux_kernel, target_os = "redox"))]
pub(crate) fn epoll_mod(
epoll: BorrowedFd<'_>,
source: BorrowedFd,
source: BorrowedFd<'_>,
event: &crate::event::epoll::Event,
) -> io::Result<()> {
unsafe {
Expand All @@ -237,7 +237,7 @@ pub(crate) fn epoll_mod(

#[inline]
#[cfg(any(linux_kernel, target_os = "redox"))]
pub(crate) fn epoll_del(epoll: BorrowedFd<'_>, source: BorrowedFd) -> io::Result<()> {
pub(crate) fn epoll_del(epoll: BorrowedFd<'_>, source: BorrowedFd<'_>) -> io::Result<()> {
unsafe {
ret(c::epoll_ctl(
borrowed_fd(epoll),
Expand Down
6 changes: 3 additions & 3 deletions src/backend/linux_raw/event/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub(crate) fn epoll_create(flags: epoll::CreateFlags) -> io::Result<OwnedFd> {
#[inline]
pub(crate) fn epoll_add(
epfd: BorrowedFd<'_>,
fd: BorrowedFd,
fd: BorrowedFd<'_>,
event: &epoll::Event,
) -> io::Result<()> {
// SAFETY: `__NR_epoll_ctl` with `EPOLL_CTL_ADD` doesn't modify any user
Expand All @@ -78,7 +78,7 @@ pub(crate) fn epoll_add(
#[inline]
pub(crate) fn epoll_mod(
epfd: BorrowedFd<'_>,
fd: BorrowedFd,
fd: BorrowedFd<'_>,
event: &epoll::Event,
) -> io::Result<()> {
// SAFETY: `__NR_epoll_ctl` with `EPOLL_CTL_MOD` doesn't modify any user
Expand All @@ -95,7 +95,7 @@ pub(crate) fn epoll_mod(
}

#[inline]
pub(crate) fn epoll_del(epfd: BorrowedFd<'_>, fd: BorrowedFd) -> io::Result<()> {
pub(crate) fn epoll_del(epfd: BorrowedFd<'_>, fd: BorrowedFd<'_>) -> io::Result<()> {
// SAFETY: `__NR_epoll_ctl` with `EPOLL_CTL_DEL` doesn't access any user
// memory.
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion src/fs/inotify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl<'buf, Fd: AsFd> Reader<'buf, Fd> {
/// error occurs.
#[allow(unsafe_code)]
#[allow(clippy::should_implement_trait)]
pub fn next(&mut self) -> io::Result<InotifyEvent> {
pub fn next(&mut self) -> io::Result<InotifyEvent<'_>> {
if self.is_buffer_empty() {
match read_uninit(self.fd.as_fd(), self.buf).map(|(init, _)| init.len()) {
Ok(0) => return Err(Errno::INVAL),
Expand Down
Loading