From 9a259f4303cd6550a38ccd12b07ae14c1e21a263 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 1 Apr 2014 20:39:26 -0700 Subject: Fix fallout of requiring uint indices --- src/libnative/io/timer_other.rs | 4 ++-- src/libnative/io/timer_win32.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libnative') diff --git a/src/libnative/io/timer_other.rs b/src/libnative/io/timer_other.rs index ea237944bad..7979075aa02 100644 --- a/src/libnative/io/timer_other.rs +++ b/src/libnative/io/timer_other.rs @@ -296,7 +296,7 @@ mod imp { } pub fn fd_set(set: &mut fd_set, fd: i32) { - set.fds_bits[fd / 32] |= 1 << (fd % 32); + set.fds_bits[(fd / 32) as uint] |= 1 << (fd % 32); } extern { @@ -323,7 +323,7 @@ mod imp { } pub fn fd_set(set: &mut fd_set, fd: i32) { - set.fds_bits[fd / 64] |= (1 << (fd % 64)) as u64; + set.fds_bits[(fd / 64) as uint] |= (1 << (fd % 64)) as u64; } extern { diff --git a/src/libnative/io/timer_win32.rs b/src/libnative/io/timer_win32.rs index a342afa6854..3e420e45448 100644 --- a/src/libnative/io/timer_win32.rs +++ b/src/libnative/io/timer_win32.rs @@ -78,7 +78,7 @@ fn helper(input: libc::HANDLE, messages: Receiver) { } } else { let remove = { - match &chans[idx - 1] { + match &chans[idx as uint - 1] { &(ref c, oneshot) => !c.try_send(()) || oneshot } }; -- cgit 1.4.1-3-g733a5