Skip to content

Commit

Permalink
Merge #468
Browse files Browse the repository at this point in the history
468: cargo update r=cuviper a=cuviper

- docopt -> 0.8
  - rustc-serialize -> serde
- glium -> 0.18
  • Loading branch information
bors[bot] committed Nov 6, 2017
2 parents 46cfbf2 + d9b637e commit e60baec
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 30 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ default-features = false

[dev-dependencies]
compiletest_rs = "0.3"
docopt = "0.7"
docopt = "0.8"
rand = "0.3"
rustc-serialize = "0.3"
serde = "1"
serde_derive = "1"
9 changes: 5 additions & 4 deletions examples/cpu_monitor.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
extern crate docopt;
extern crate rayon;
extern crate rustc_serialize;
#[macro_use]
extern crate serde_derive;
extern crate serde;

use docopt::Docopt;
use std::env;
use std::io;
use std::process;

Expand All @@ -27,15 +28,15 @@ Options:
-d N, --depth N Control how hard the dummy task works [default: 27]
";

#[derive(RustcDecodable)]
#[derive(Deserialize)]
pub struct Args {
arg_scenario: String,
flag_depth: usize,
}

fn main() {
let args: &Args =
&Docopt::new(USAGE).and_then(|d| d.argv(env::args()).decode()).unwrap_or_else(|e| e.exit());
&Docopt::new(USAGE).and_then(|d| d.deserialize()).unwrap_or_else(|e| e.exit());

match &args.arg_scenario[..] {
"tasks_ended" => tasks_ended(args),
Expand Down
17 changes: 9 additions & 8 deletions rayon-demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ publish = false

[dependencies]
rayon = { path = "../" }
cgmath = "0.14"
docopt = "0.7"
glium = "0.17"
rand = "0.3"
rustc-serialize = "0.3"
time = "0.1"
odds = "0.2"
lazy_static = "0.2.1"
cgmath = "0.15"
docopt = "0.8"
fixedbitset = "0.1.5"
glium = "0.18"
lazy_static = "0.2.1"
odds = "0.2"
rand = "0.3"
regex = "0.2"
serde = "1"
serde_derive = "1"
time = "0.1"

[dev-dependencies]
num = "0.1.30"
4 changes: 2 additions & 2 deletions rayon-demo/src/life/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use rayon::prelude::*;
#[cfg(test)]
mod bench;

#[derive(RustcDecodable)]
#[derive(Deserialize)]
pub struct Args {
cmd_bench: bool,
flag_size: usize,
Expand Down Expand Up @@ -158,7 +158,7 @@ fn measure(f: fn(Board, usize) -> (), args: &Args) -> u64 {
pub fn main(args: &[String]) {
let args: Args =
Docopt::new(USAGE)
.and_then(|d| d.argv(args).decode())
.and_then(|d| d.argv(args).deserialize())
.unwrap_or_else(|e| e.exit());

if args.cmd_bench {
Expand Down
4 changes: 3 additions & 1 deletion rayon-demo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ mod life;

extern crate rayon; // all
extern crate docopt; // all
#[macro_use]
extern crate serde_derive; // all
extern crate serde; // all
extern crate cgmath; // nbody
#[macro_use]
extern crate glium; // nbody
extern crate rand; // nbody
extern crate rustc_serialize; // nbody
extern crate time; // nbody, sieve
extern crate odds; // sieve
#[cfg(test)]
Expand Down
4 changes: 2 additions & 2 deletions rayon-demo/src/matmul/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Options:
-h, --help Show this message.
";

#[derive(RustcDecodable)]
#[derive(Deserialize)]
pub struct Args {
cmd_bench: bool,
flag_size: usize,
Expand Down Expand Up @@ -369,7 +369,7 @@ fn timed_matmul<F: FnOnce(&[f32], &[f32], &mut [f32])>(size: usize, f: F, name:
pub fn main(args: &[String]) {
let args: Args =
Docopt::new(USAGE)
.and_then(|d| d.argv(args).decode())
.and_then(|d| d.argv(args).deserialize())
.unwrap_or_else(|e| e.exit());

if args.cmd_bench {
Expand Down
4 changes: 2 additions & 2 deletions rayon-demo/src/mergesort/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Options:
-h, --help Show this message.
";

#[derive(RustcDecodable)]
#[derive(Deserialize)]
pub struct Args {
cmd_bench: bool,
flag_size: usize,
Expand Down Expand Up @@ -242,7 +242,7 @@ fn timed_sort<F: FnOnce(&mut [u32])>(n: usize, f: F, name: &str) -> u64 {
pub fn main(args: &[String]) {
let args: Args =
Docopt::new(USAGE)
.and_then(|d| d.argv(args).decode())
.and_then(|d| d.argv(args).deserialize())
.unwrap_or_else(|e| e.exit());

if args.cmd_bench {
Expand Down
6 changes: 3 additions & 3 deletions rayon-demo/src/nbody/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ Ported from the RiverTrail demo found at:
https://github.com/IntelLabs/RiverTrail/tree/master/examples/nbody-webgl
";

#[derive(Copy, Clone, PartialEq, Eq, RustcDecodable)]
#[derive(Copy, Clone, PartialEq, Eq, Deserialize)]
pub enum ExecutionMode {
Par,
ParReduce,
Seq,
}

#[derive(RustcDecodable)]
#[derive(Deserialize)]
pub struct Args {
cmd_bench: bool,
cmd_visualize: bool,
Expand All @@ -62,7 +62,7 @@ pub struct Args {
pub fn main(args: &[String]) {
let args: Args =
Docopt::new(USAGE)
.and_then(|d| d.argv(args).decode())
.and_then(|d| d.argv(args).deserialize())
.unwrap_or_else(|e| e.exit());

if args.cmd_bench {
Expand Down
4 changes: 2 additions & 2 deletions rayon-demo/src/quicksort/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Options:
-h, --help Show this message.
";

#[derive(RustcDecodable)]
#[derive(Deserialize)]
pub struct Args {
cmd_bench: bool,
flag_size: usize,
Expand Down Expand Up @@ -121,7 +121,7 @@ fn timed_sort<F: FnOnce(&mut [u32])>(n: usize, f: F, name: &str) -> u64 {
pub fn main(args: &[String]) {
let args: Args =
Docopt::new(USAGE)
.and_then(|d| d.argv(args).decode())
.and_then(|d| d.argv(args).deserialize())
.unwrap_or_else(|e| e.exit());

if args.cmd_bench {
Expand Down
4 changes: 2 additions & 2 deletions rayon-demo/src/sieve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Options:
-h, --help Show this message.
";

#[derive(RustcDecodable)]
#[derive(Deserialize)]
pub struct Args {
cmd_bench: bool,
}
Expand Down Expand Up @@ -179,7 +179,7 @@ fn measure(f: fn(usize) -> Vec<bool>) -> u64 {
pub fn main(args: &[String]) {
let args: Args =
Docopt::new(USAGE)
.and_then(|d| d.argv(args).decode())
.and_then(|d| d.argv(args).deserialize())
.unwrap_or_else(|e| e.exit());

if args.cmd_bench {
Expand Down
4 changes: 2 additions & 2 deletions rayon-demo/src/tsp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Options:
--from N Node index from which to start the search [default: 0].
";

#[derive(RustcDecodable)]
#[derive(Deserialize)]
pub struct Args {
cmd_bench: bool,
arg_datafile: String,
Expand All @@ -52,7 +52,7 @@ pub struct Args {
pub fn main(args: &[String]) {
let args: Args =
Docopt::new(USAGE)
.and_then(|d| d.argv(args).decode())
.and_then(|d| d.argv(args).deserialize())
.unwrap_or_else(|e| e.exit());

if args.cmd_bench {
Expand Down

0 comments on commit e60baec

Please sign in to comment.