Skip to content

Commit 29bbd8e

Browse files
I propose exposing the std::os::fd::AsRawFd trait method for nix::sys::fanotify::Fanotify struct (#2575)
* Exposed the ```std::os::fd::AsRawFd``` trait method for ```nix::sys::fanotify::Fanotify``` struct * Pull request number is set
1 parent aeb6fac commit 29bbd8e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

changelog/2575.added.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Exposed the ```std::os::fd::AsRawFd``` trait method for ```nix::sys::fanotify::Fanotify``` struct

src/sys/fanotify.rs

+7
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,13 @@ impl AsFd for Fanotify {
419419
}
420420
}
421421

422+
impl AsRawFd for Fanotify {
423+
fn as_raw_fd(&self) -> RawFd
424+
{
425+
self.fd.as_raw_fd()
426+
}
427+
}
428+
422429
impl From<Fanotify> for OwnedFd {
423430
fn from(value: Fanotify) -> Self {
424431
value.fd

0 commit comments

Comments
 (0)