Skip to content
Prev Previous commit
Next Next commit
crt_fd.rs
  • Loading branch information
ShaharNaveh committed May 2, 2026
commit 10e7d9dabc4d8e5e43fc0f01047d0b78eaf683c6
13 changes: 8 additions & 5 deletions crates/host_env/src/crt_fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ mod win {

impl OwnedInner {
#[inline]
pub unsafe fn from_raw_fd(fd: Raw) -> Self {
pub(super) unsafe fn from_raw_fd(fd: Raw) -> Self {
Self(fd)
}

#[inline]
pub fn as_raw_fd(&self) -> Raw {
pub(super) fn as_raw_fd(&self) -> Raw {
self.0
}

#[inline]
pub fn into_raw_fd(self) -> Raw {
pub(super) fn into_raw_fd(self) -> Raw {
let me = ManuallyDrop::new(self);
me.0
}
Expand All @@ -102,14 +104,15 @@ mod win {

impl BorrowedInner<'_> {
#[inline]
pub const unsafe fn borrow_raw(fd: Raw) -> Self {
pub(super) const unsafe fn borrow_raw(fd: Raw) -> Self {
Self {
fd,
_marker: PhantomData,
}
}

#[inline]
pub fn as_raw_fd(&self) -> Raw {
pub(super) fn as_raw_fd(&self) -> Raw {
self.fd
}
}
Expand Down
Loading