From 51a2ebbc73e04d2c0a0f6b9b2fc1d76160a1650c Mon Sep 17 00:00:00 2001 From: zethra Date: Fri, 3 Jul 2020 03:06:11 -0400 Subject: [PATCH] Added AsRawFd impl to MouseTerminal --- src/input.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/input.rs b/src/input.rs index 11afab5..5f763e6 100644 --- a/src/input.rs +++ b/src/input.rs @@ -224,6 +224,18 @@ impl Write for MouseTerminal { } } +#[cfg(unix)] +mod unix_impl { + use super::*; + use std::os::unix::io::{AsRawFd, RawFd}; + + impl AsRawFd for MouseTerminal { + fn as_raw_fd(&self) -> RawFd { + self.term.as_raw_fd() + } + } +} + #[cfg(test)] mod test { use super::*;