diff options
author | Oleksandr Anyshchenko <oleksandr.anyshchenko@xdev.re> | 2021-06-18 11:16:00 +0300 |
---|---|---|
committer | Oleksandr Anyshchenko <oleksandr.anyshchenko@xdev.re> | 2021-06-18 11:16:00 +0300 |
commit | 71a6119fe6915d4a3707c5bee5df7a719ef99623 (patch) | |
tree | e26e5a06281de7cba1252cedf47443b850b2d077 /src/display | |
parent | 83795803ccc1dcd30b23f48648f1a4943cf60020 (diff) |
Fix building error on FreeBSD host
Diffstat (limited to 'src/display')
-rw-r--r-- | src/display/cell_size.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/display/cell_size.rs b/src/display/cell_size.rs index a7628ca..29685dd 100644 --- a/src/display/cell_size.rs +++ b/src/display/cell_size.rs @@ -29,7 +29,8 @@ pub fn cell_size_in_pixels() -> std::io::Result<(u32, u32)> { ws_xpixel: 0, ws_ypixel: 0, }; - let r = unsafe { ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) }; + #[allow(clippy::useless_conversion)] + let r = unsafe { ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &w) }; if r == 0 && w.ws_xpixel > w.ws_col && w.ws_ypixel > w.ws_row { Ok(( (w.ws_xpixel / w.ws_col) as u32, |