Commit 025c142c authored by Jonathan Schleußer's avatar Jonathan Schleußer
parents f22f01fc c04fd9dc
Pipeline #2508 passed with stages
in 3 minutes and 10 seconds
......@@ -14,7 +14,7 @@ struct TermSize {
pub fn terminal_size() -> io::Result<(u16, u16)> {
unsafe {
let mut size: TermSize = mem::zeroed();
cvt(ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut size as *mut _))?;
cvt(ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut size as *mut _))?;
Ok((size.col as u16, size.row 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