Suppress warnings on 32bit platforms.
On 32bit platforms, int is the same as i32, so 0xffffffff is "out of range." Annotating variables as u32 fixes the problems. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This commit is contained in:
parent
6ce7dfb996
commit
7af5f646f1
@ -1906,7 +1906,7 @@ mod test_map {
|
||||
}
|
||||
assert_eq!(m.len(), 32);
|
||||
|
||||
let mut observed = 0;
|
||||
let mut observed: u32 = 0;
|
||||
|
||||
for (k, v) in m.iter() {
|
||||
assert_eq!(*v, *k * 2);
|
||||
@ -2102,7 +2102,7 @@ mod test_set {
|
||||
for i in range(0u, 32) {
|
||||
assert!(a.insert(i));
|
||||
}
|
||||
let mut observed = 0;
|
||||
let mut observed: u32 = 0;
|
||||
for k in a.iter() {
|
||||
observed |= 1 << *k;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user