diff options
Diffstat (limited to 'winpty')
-rw-r--r-- | winpty/src/windows.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winpty/src/windows.rs b/winpty/src/windows.rs index 67370709..84762585 100644 --- a/winpty/src/windows.rs +++ b/winpty/src/windows.rs @@ -201,12 +201,12 @@ impl<'a, 'b> Winpty<'a> { /// Change the size of the Windows console window. /// /// cols & rows MUST be greater than 0 - pub fn set_size(&mut self, cols: usize, rows: usize) -> Result<(), Err> { + pub fn set_size(&mut self, cols: u16, rows: u16) -> Result<(), Err> { assert!(cols > 0 && rows > 0); let mut err = null_mut() as *mut winpty_error_t; unsafe { - winpty_set_size(self.0, cols as i32, rows as i32, &mut err); + winpty_set_size(self.0, i32::from(cols), i32::from(rows), &mut err); } if let Some(err) = check_err(err) { |