Commit 1e05ff75 authored by rabite0's avatar rabite0

Revert "don't warn about unused x/y on redox"

This reverts commit 44243737
parent 44243737
Pipeline #5032 passed with stages
in 3 minutes and 14 seconds
......@@ -7,8 +7,8 @@ use super::libc::{c_ushort, ioctl, STDOUT_FILENO, TIOCGWINSZ};
struct TermSize {
row: c_ushort,
col: c_ushort,
_x: c_ushort,
_y: c_ushort,
x: c_ushort,
y: c_ushort,
}
/// Get the size of the terminal.
pub fn terminal_size() -> io::Result<(u16, u16)> {
......@@ -24,7 +24,7 @@ pub fn terminal_size_pixels() -> io::Result<(u16, u16)> {
unsafe {
let mut size: TermSize = mem::zeroed();
cvt(ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut size as *mut _))?;
Ok((size._x as u16,
size._y as u16))
Ok((size.x as u16,
size.y as u16))
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment