From bc199b57784ec60bc9492c1a046c585af7ee8ea4 Mon Sep 17 00:00:00 2001 From: Benjamin Lamowski Date: Fri, 14 Jan 2022 17:42:40 +0100 Subject: [PATCH] add as_raw() method to L4Re's Socket mock Minimally comply with with #87329 to avoid breaking tests on L4Re. --- library/std/src/sys/unix/l4re.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/std/src/sys/unix/l4re.rs b/library/std/src/sys/unix/l4re.rs index d45c51030f67c..f052d8f7f055f 100644 --- a/library/std/src/sys/unix/l4re.rs +++ b/library/std/src/sys/unix/l4re.rs @@ -122,6 +122,11 @@ pub mod net { pub fn take_error(&self) -> io::Result> { unimpl!(); } + + // This is used by sys_common code to abstract over Windows and Unix. + pub fn as_raw(&self) -> RawFd { + self.as_raw_fd() + } } impl AsInner for Socket {