Move to stable rust
diff --git a/src/distributions/mod.rs b/src/distributions/mod.rs
index e330623..ae101be 100644
--- a/src/distributions/mod.rs
+++ b/src/distributions/mod.rs
@@ -388,7 +388,7 @@
}
#[test] #[should_panic]
fn test_weighted_choice_weight_overflows() {
- let x = !0 / 2; // x + x + 2 is the overflow
+ let x = ::std::u32::MAX / 2; // x + x + 2 is the overflow
WeightedChoice::new(&mut [Weighted { weight: x, item: 0 },
Weighted { weight: 1, item: 1 },
Weighted { weight: x, item: 2 },
diff --git a/src/isaac.rs b/src/isaac.rs
index 32cc4ea..7d55e39 100644
--- a/src/isaac.rs
+++ b/src/isaac.rs
@@ -91,7 +91,7 @@
if use_rsl {
macro_rules! memloop {
($arr:expr) => {{
- for i in (0..RAND_SIZE_USIZE).step_by(8) {
+ for i in (0..RAND_SIZE_USIZE/8).map(|i| i * 8) {
a=a+$arr[i ]; b=b+$arr[i+1];
c=c+$arr[i+2]; d=d+$arr[i+3];
e=e+$arr[i+4]; f=f+$arr[i+5];
@@ -108,7 +108,7 @@
memloop!(self.rsl);
memloop!(self.mem);
} else {
- for i in (0..RAND_SIZE_USIZE).step_by(8) {
+ for i in (0..RAND_SIZE_USIZE/8).map(|i| i * 8) {
mix!();
self.mem[i ]=a; self.mem[i+1]=b;
self.mem[i+2]=c; self.mem[i+3]=d;
@@ -167,7 +167,7 @@
}}
}
- for i in (0..MIDPOINT).step_by(4) {
+ for i in (0..MIDPOINT/4).map(|i| i * 4) {
rngstepp!(i + 0, 13);
rngstepn!(i + 1, 6);
rngstepp!(i + 2, 2);
diff --git a/src/lib.rs b/src/lib.rs
index a90e89c..90f56d8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -224,7 +224,6 @@
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/rand/")]
-#![feature(step_by)]
#![cfg_attr(test, feature(core, test))]