diff --git a/Cargo.toml b/Cargo.toml index be9d579..4a89cf6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ edition = "2018" [target.'cfg(not(windows))'.dependencies] -rustix = { version = "0.35.6", features = ["termios"] } +rustix = { version = "0.35.7", features = ["termios"] } [target.'cfg(windows)'.dependencies.windows-sys] version = "0.36.0" diff --git a/src/unix.rs b/src/unix.rs index ddc2fa8..59af979 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -1,12 +1,12 @@ use super::{Height, Width}; use std::os::unix::io::RawFd; -use rustix::fd::{BorrowedFd, AsRawFd}; +use rustix::fd::BorrowedFd; /// Returns the size of the terminal defaulting to STDOUT, if available. /// /// If STDOUT is not a tty, returns `None` pub fn terminal_size() -> Option<(Width, Height)> { - terminal_size_using_fd(std::io::stdout().as_raw_fd()) + terminal_size_using_fd(rustix::io::raw_stdout()) } /// Returns the size of the terminal using the given file descriptor, if available.