From 0c44007b7e4377ff4d21413c82c12e3dee8d7dfe Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Sun, 9 Jun 2024 16:35:28 +0200 Subject: [PATCH] Implement AsFd for Unix pipe Sender --- src/sys/unix/pipe.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sys/unix/pipe.rs b/src/sys/unix/pipe.rs index 986bd3ffc..b15cd5132 100644 --- a/src/sys/unix/pipe.rs +++ b/src/sys/unix/pipe.rs @@ -397,6 +397,12 @@ impl IntoRawFd for Sender { } } +impl AsFd for Sender { + fn as_fd(&self) -> BorrowedFd<'_> { + self.inner.as_fd() + } +} + /// Receiving end of an Unix pipe. /// /// See [`new`] for documentation, including examples.