about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-02-19 21:05:35 -0800
committerBrian Anderson <banderson@mozilla.com>2015-03-02 16:12:46 -0800
commit76e9fa63ba0b6d892aa880db9c8373ede3e67c03 (patch)
tree5c932ad4ef0079ca1f4a8b3d0767f7e5984df2a5 /src/libstd/sys
parent2ca6eaedae9ec4bff2a63f81f473aba653e46ac5 (diff)
downloadrust-76e9fa63ba0b6d892aa880db9c8373ede3e67c03.tar.gz
rust-76e9fa63ba0b6d892aa880db9c8373ede3e67c03.zip
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]
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/c.rs4
1 files changed, 2 insertions, 2 deletions
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);
     }
 }