From 85449aa8c3d11d821d3b8764178584ff9d9c5373 Mon Sep 17 00:00:00 2001 From: Mark Poliakov Date: Fri, 22 Dec 2023 13:10:55 +0200 Subject: [PATCH] alnyan/yggdrasil: PollWait now returns errors --- library/std/src/os/yggdrasil/io/poll.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/library/std/src/os/yggdrasil/io/poll.rs b/library/std/src/os/yggdrasil/io/poll.rs index 6c52f30379f..0980a5c240e 100644 --- a/library/std/src/os/yggdrasil/io/poll.rs +++ b/library/std/src/os/yggdrasil/io/poll.rs @@ -24,11 +24,14 @@ impl PollChannel { } #[unstable(feature = "yggdrasil_os", issue = "none")] - pub fn wait(&mut self, timeout: Option) -> io::Result> { + pub fn wait( + &mut self, + timeout: Option, + ) -> io::Result)>> { let mut output = None; cvt_io(unsafe { yggdrasil_rt::sys::poll_channel_wait(self.0.as_raw_fd(), &timeout, &mut output) })?; - Ok(output) + Ok(output.map(|(l, r)| (l, cvt_io(r)))) } }