From 76e9fa63ba0b6d892aa880db9c8373ede3e67c03 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 19 Feb 2015 21:05:35 -0800 Subject: core: Audit num module for int/uint * count_ones/zeros, trailing_ones/zeros return u32, not usize * rotate_left/right take u32, not usize * RADIX, MANTISSA_DIGITS, DIGITS, BITS, BYTES are u32, not usize Doesn't touch pow because there's another PR for it. [breaking-change] --- src/libstd/sys/unix/c.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs index 14394a653b0..4e9f9c80a18 100644 --- a/src/libstd/sys/unix/c.rs +++ b/src/libstd/sys/unix/c.rs @@ -194,12 +194,12 @@ mod select { #[repr(C)] pub struct fd_set { // FIXME: shouldn't this be a c_ulong? - fds_bits: [libc::uintptr_t; (FD_SETSIZE / usize::BITS)] + fds_bits: [libc::uintptr_t; (FD_SETSIZE / usize::BITS as usize)] } pub fn fd_set(set: &mut fd_set, fd: i32) { let fd = fd as uint; - set.fds_bits[fd / usize::BITS] |= 1 << (fd % usize::BITS); + set.fds_bits[fd / usize::BITS as usize] |= 1 << (fd % usize::BITS as usize); } } -- cgit 1.4.1-3-g733a5