Added AsRawFd impl to MouseTerminal

This commit is contained in:
zethra 2020-07-03 03:06:11 -04:00
parent 189222555e
commit 51a2ebbc73
1 changed files with 12 additions and 0 deletions

View File

@ -224,6 +224,18 @@ impl<W: Write> Write for MouseTerminal<W> {
}
}
#[cfg(unix)]
mod unix_impl {
use super::*;
use std::os::unix::io::{AsRawFd, RawFd};
impl<W: Write + AsRawFd> AsRawFd for MouseTerminal<W> {
fn as_raw_fd(&self) -> RawFd {
self.term.as_raw_fd()
}
}
}
#[cfg(test)]
mod test {
use super::*;