Skip to content

Commit d2609d8

Browse files
committed
Update dev and demo dependencies
- `cgmath 0.17` - `glium 0.23` - `rand 0.6`
1 parent b4553ab commit d2609d8

File tree

14 files changed

+36
-20
lines changed

14 files changed

+36
-20
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ default-features = false
3030
[dev-dependencies]
3131
docopt = "1"
3232
lazy_static = "1"
33-
rand = "0.5"
33+
rand = "0.6"
34+
rand_xorshift = "0.1"
3435
serde = "1"
3536
serde_derive = "1"

rayon-core/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ version = "0.2.0"
2828
version = "0.3.0"
2929

3030
[dev-dependencies]
31-
rand = "0.5"
31+
rand = "0.6"
32+
rand_xorshift = "0.1"
3233

3334
[[test]]
3435
name = "stack_overflow_crash"

rayon-core/src/join/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
33
use join::*;
44
use rand::distributions::Standard;
5-
use rand::{Rng, SeedableRng, XorShiftRng};
5+
use rand::{Rng, SeedableRng};
6+
use rand_xorshift::XorShiftRng;
67
use unwind;
78
use ThreadPoolBuilder;
89

rayon-core/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ extern crate num_cpus;
4040

4141
#[cfg(test)]
4242
extern crate rand;
43+
#[cfg(test)]
44+
extern crate rand_xorshift;
4345

4446
#[macro_use]
4547
mod log;

rayon-core/src/scope/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
use rand::{Rng, SeedableRng, XorShiftRng};
1+
use rand::{Rng, SeedableRng};
2+
use rand_xorshift::XorShiftRng;
23
use std::cmp;
34
use std::iter::once;
45
use std::sync::atomic::{AtomicUsize, Ordering};

rayon-demo/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ publish = false
66

77
[dependencies]
88
rayon = { path = "../" }
9-
cgmath = "0.16"
9+
cgmath = "0.17"
1010
docopt = "1"
1111
fixedbitset = "0.1.5"
12-
glium = "0.21"
12+
glium = "0.23"
1313
lazy_static = "1"
1414
odds = "0.3"
15-
rand = "0.5"
15+
rand = "0.6"
16+
rand_xorshift = "0.1"
1617
regex = "1"
1718
serde = "1"
1819
serde_derive = "1"

rayon-demo/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ extern crate libc; // life
4848
extern crate num;
4949
extern crate odds; // sieve
5050
extern crate rand; // nbody
51+
extern crate rand_xorshift; // nbody
5152
extern crate time; // nbody, sieve // factorial
5253
#[macro_use]
5354
extern crate lazy_static; // find
@@ -109,8 +110,9 @@ fn main() {
109110
}
110111
}
111112

112-
fn seeded_rng() -> rand::XorShiftRng {
113-
use rand::{SeedableRng, XorShiftRng};
113+
fn seeded_rng() -> rand_xorshift::XorShiftRng {
114+
use rand::SeedableRng;
115+
use rand_xorshift::XorShiftRng;
114116
let mut seed = <XorShiftRng as SeedableRng>::Seed::default();
115117
(0..).zip(seed.as_mut()).for_each(|(i, x)| *x = i);
116118
XorShiftRng::from_seed(seed)

rayon-demo/src/nbody/visualize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ implement_vertex!(Instance, color, world_position);
8080
pub fn visualize_benchmarks(num_bodies: usize, mut mode: ExecutionMode) {
8181
let mut events_loop = EventsLoop::new();
8282
let window = WindowBuilder::new()
83-
.with_dimensions(800, 600)
83+
.with_dimensions((800, 600).into())
8484
.with_title("nbody demo".to_string());
8585
let context = ContextBuilder::new().with_depth_buffer(24);
8686
let display = Display::new(window, context, &events_loop).unwrap();
@@ -191,7 +191,7 @@ pub fn visualize_benchmarks(num_bodies: usize, mut mode: ExecutionMode) {
191191
events_loop.poll_events(|event| {
192192
if let Event::WindowEvent { event, .. } = event {
193193
match event {
194-
WindowEvent::Closed => done = true,
194+
WindowEvent::CloseRequested => done = true,
195195
WindowEvent::KeyboardInput { input, .. } => {
196196
if let ElementState::Pressed = input.state {
197197
match input.virtual_keycode {

rayon-demo/src/str_split.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
//! Some microbenchmarks for splitting strings
22
3-
use rand::Rng;
3+
use rand::seq::SliceRandom;
44
use rayon::prelude::*;
55
use test::Bencher;
66

77
lazy_static! {
88
static ref HAYSTACK: String = {
99
let mut rng = ::seeded_rng();
1010
let mut bytes: Vec<u8> = "abcdefg ".bytes().cycle().take(1_000_000).collect();
11-
rng.shuffle(&mut bytes);
11+
bytes.shuffle(&mut rng);
1212
String::from_utf8(bytes).unwrap()
1313
};
1414
static ref COUNT: usize = { HAYSTACK.split(' ').count() };

src/iter/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use prelude::*;
55
use rayon_core::*;
66

77
use rand::distributions::Standard;
8-
use rand::{Rng, SeedableRng, XorShiftRng};
8+
use rand::{Rng, SeedableRng};
9+
use rand_xorshift::XorShiftRng;
910
use std::collections::LinkedList;
1011
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
1112
use std::collections::{BinaryHeap, VecDeque};

0 commit comments

Comments
 (0)