about summary refs log tree commit diff
path: root/src/libstd/sys/windows/tty.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-25 17:06:52 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-26 12:10:22 -0700
commit43bfaa4a336095eb5697fb2df50909fd3c72ed14 (patch)
treee10610e1ce9811c89e1291b786d7a49b63ee02d9 /src/libstd/sys/windows/tty.rs
parent54f16b818b58f6d6e81891b041fc751986e75155 (diff)
downloadrust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.tar.gz
rust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.zip
Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
Diffstat (limited to 'src/libstd/sys/windows/tty.rs')
-rw-r--r--src/libstd/sys/windows/tty.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sys/windows/tty.rs b/src/libstd/sys/windows/tty.rs
index 52f4cce4aa3..38faabf3276 100644
--- a/src/libstd/sys/windows/tty.rs
+++ b/src/libstd/sys/windows/tty.rs
@@ -92,7 +92,7 @@ impl TTY {
         }
     }
 
-    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         // Read more if the buffer is empty
         if self.utf8.eof() {
             let mut utf16: Vec<u16> = repeat(0u16).take(0x1000).collect();
@@ -105,7 +105,7 @@ impl TTY {
                 0 => return Err(super::last_error()),
                 _ => (),
             };
-            utf16.truncate(num as uint);
+            utf16.truncate(num as usize);
             let utf8 = match String::from_utf16(&utf16) {
                 Ok(utf8) => utf8.into_bytes(),
                 Err(..) => return Err(invalid_encoding()),
@@ -149,12 +149,12 @@ impl TTY {
         }
     }
 
-    pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
+    pub fn get_winsize(&mut self) -> IoResult<(isize, isize)> {
         let mut info: CONSOLE_SCREEN_BUFFER_INFO = unsafe { mem::zeroed() };
         match unsafe { GetConsoleScreenBufferInfo(self.handle, &mut info as *mut _) } {
             0 => Err(super::last_error()),
-            _ => Ok(((info.srWindow.Right + 1 - info.srWindow.Left) as int,
-                     (info.srWindow.Bottom + 1 - info.srWindow.Top) as int)),
+            _ => Ok(((info.srWindow.Right + 1 - info.srWindow.Left) as isize,
+                     (info.srWindow.Bottom + 1 - info.srWindow.Top) as isize)),
         }
     }
 }