Skip to content
Merged
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: 6 additions & 0 deletions compio-driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ macro_rules! impl_raw_fd {
}
}
#[cfg(unix)]
impl std::os::fd::AsFd for $t {
fn as_fd(&self) -> std::os::fd::BorrowedFd<'_> {
self.$inner.as_fd()
}
}
#[cfg(unix)]
impl std::os::fd::FromRawFd for $t {
unsafe fn from_raw_fd(fd: $crate::RawFd) -> Self {
Self {
Expand Down
Loading