Skip to content

Commit

Permalink
Bump to 0.2.1
Browse files Browse the repository at this point in the history
Closes #32
  • Loading branch information
alexcrichton committed Mar 22, 2015
1 parent 3b25464 commit 0b8c3eb
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "rand"
version = "0.2.0"
version = "0.2.1"
authors = ["The Rust Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand Down
2 changes: 0 additions & 2 deletions src/distributions/exponential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ mod test {
mod bench {
extern crate test;

use std::prelude::v1::*;

use self::test::Bencher;
use std::mem::size_of;
use super::Exp;
Expand Down
1 change: 0 additions & 1 deletion src/distributions/gamma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ mod test {
#[cfg(test)]
mod bench {
extern crate test;
use std::prelude::v1::*;
use self::test::Bencher;
use std::mem::size_of;
use distributions::IndependentSample;
Expand Down
1 change: 0 additions & 1 deletion src/distributions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ fn ziggurat<R: Rng, P, Z>(

#[cfg(test)]
mod tests {
use std::prelude::v1::*;

use {Rng, Rand};
use super::{RandSample, WeightedChoice, Weighted, Sample, IndependentSample};
Expand Down
1 change: 0 additions & 1 deletion src/distributions/normal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ mod tests {
#[cfg(test)]
mod bench {
extern crate test;
use std::prelude::v1::*;
use self::test::Bencher;
use std::mem::size_of;
use distributions::{Sample};
Expand Down
1 change: 0 additions & 1 deletion src/distributions/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ float_impl! { f64 }
#[cfg(test)]
mod tests {
use std::num::Int;
use std::prelude::v1::*;
use distributions::{Sample, IndependentSample};
use super::Range as Range;

Expand Down
8 changes: 4 additions & 4 deletions src/isaac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#![allow(non_camel_case_types)]

use std::slice;
use std::iter::{range_step, repeat};
use std::iter::repeat;
use std::num::wrapping::Wrapping as w;

use {Rng, SeedableRng, Rand, w32, w64};
Expand Down Expand Up @@ -91,7 +91,7 @@ impl IsaacRng {
if use_rsl {
macro_rules! memloop {
($arr:expr) => {{
for i in range_step(0, RAND_SIZE_USIZE, 8) {
for i in (0..RAND_SIZE_USIZE).step_by(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];
Expand All @@ -108,7 +108,7 @@ impl IsaacRng {
memloop!(self.rsl);
memloop!(self.mem);
} else {
for i in range_step(0, RAND_SIZE_USIZE, 8) {
for i in (0..RAND_SIZE_USIZE).step_by(8) {
mix!();
self.mem[i ]=a; self.mem[i+1]=b;
self.mem[i+2]=c; self.mem[i+3]=d;
Expand Down Expand Up @@ -167,7 +167,7 @@ impl IsaacRng {
}}
}

for i in range_step(0, MIDPOINT, 4) {
for i in (0..MIDPOINT).step_by(4) {
rngstepp!(i + 0, 13);
rngstepn!(i + 1, 6);
rngstepp!(i + 2, 2);
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
#![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(core, io)]
#![feature(core, io, step_by)]

#![cfg_attr(test, feature(test))]

Expand Down
4 changes: 2 additions & 2 deletions src/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ mod imp {
let mut buf: [u8; 0] = [];
let result = getrandom(&mut buf);
let available = if result == -1 {
let err = ::std::os::errno() as libc::c_int;
err != libc::ENOSYS
let err = io::Error::last_os_error().raw_os_error();
err != Some(libc::ENOSYS)
} else {
true
};
Expand Down

0 comments on commit 0b8c3eb

Please sign in to comment.