Annotate the tuple
Make clear that the tuple is (columns, rows).
This commit is contained in:
parent
dce5e7500f
commit
d6f42c9d61
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue