Annotate the tuple

Make clear that the tuple is (columns, rows).
This commit is contained in:
Richard Bradshaw 2021-06-26 18:13:37 +01:00
parent dce5e7500f
commit d6f42c9d61
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ struct TermSize {
x: c_ushort, x: c_ushort,
y: c_ushort, y: c_ushort,
} }
/// Get the size of the terminal. /// Get the size (columns, rows) of the terminal.
pub fn terminal_size() -> io::Result<(u16, u16)> { pub fn terminal_size() -> io::Result<(u16, u16)> {
unsafe { unsafe {
let mut size: TermSize = mem::zeroed(); let mut size: TermSize = mem::zeroed();