diff --git a/examples/cpu_monitor.rs b/examples/cpu_monitor.rs index bc449569a..1ad1db763 100644 --- a/examples/cpu_monitor.rs +++ b/examples/cpu_monitor.rs @@ -2,7 +2,6 @@ extern crate serde_derive; use docopt::Docopt; -use rayon; use std::io; use std::process; diff --git a/rayon-core/src/lib.rs b/rayon-core/src/lib.rs index 5365fe284..fd9c360ab 100644 --- a/rayon-core/src/lib.rs +++ b/rayon-core/src/lib.rs @@ -64,8 +64,6 @@ pub use self::thread_pool::current_thread_has_pending_tasks; pub use self::thread_pool::current_thread_index; pub use self::thread_pool::ThreadPool; -use crossbeam_utils; -use num_cpus; use self::registry::{CustomSpawn, DefaultSpawn, ThreadSpawn}; /// Returns the number of threads in the current registry. If this diff --git a/rayon-core/tests/scope_join.rs b/rayon-core/tests/scope_join.rs index 3bf07d6b5..9d88133bc 100644 --- a/rayon-core/tests/scope_join.rs +++ b/rayon-core/tests/scope_join.rs @@ -1,5 +1,3 @@ -use rayon_core; - /// Test that one can emulate join with `scope`: fn pseudo_join(f: F, g: G) where diff --git a/rayon-demo/src/factorial/mod.rs b/rayon-demo/src/factorial/mod.rs index 3ec42ca75..16ef9991f 100644 --- a/rayon-demo/src/factorial/mod.rs +++ b/rayon-demo/src/factorial/mod.rs @@ -1,10 +1,8 @@ //! Benchmark Factorial N! = 1×2×⋯×N use num::{BigUint, One}; -use rayon; use rayon::prelude::*; use std::ops::Mul; -use test; const N: u32 = 9999; diff --git a/rayon-demo/src/fibonacci/mod.rs b/rayon-demo/src/fibonacci/mod.rs index 21d8be86c..1500871fc 100644 --- a/rayon-demo/src/fibonacci/mod.rs +++ b/rayon-demo/src/fibonacci/mod.rs @@ -15,8 +15,6 @@ extern crate test; -use rayon; - const N: u32 = 32; const FN: u32 = 2_178_309; diff --git a/rayon-demo/src/join_microbench.rs b/rayon-demo/src/join_microbench.rs index a978498f4..f56206ef9 100644 --- a/rayon-demo/src/join_microbench.rs +++ b/rayon-demo/src/join_microbench.rs @@ -1,6 +1,5 @@ //! Some microbenchmarks that stress test a pure `join` path. -use rayon; use rayon::prelude::*; use std::usize; use test::Bencher; diff --git a/rayon-demo/src/life/mod.rs b/rayon-demo/src/life/mod.rs index 550685b15..25cc2998c 100644 --- a/rayon-demo/src/life/mod.rs +++ b/rayon-demo/src/life/mod.rs @@ -21,7 +21,6 @@ use std::iter::repeat; use std::num::Wrapping; use std::sync::Arc; use std::thread; -use time; use docopt::Docopt; use rayon::iter::ParallelBridge; diff --git a/rayon-demo/src/main.rs b/rayon-demo/src/main.rs index 9494e992a..c1be50236 100644 --- a/rayon-demo/src/main.rs +++ b/rayon-demo/src/main.rs @@ -47,9 +47,6 @@ extern crate winapi; // life #[cfg(test)] extern crate test; -use rand; -use rand_xorshift; - const USAGE: &str = " Usage: rayon-demo bench rayon-demo [ options ] diff --git a/rayon-demo/src/matmul/bench.rs b/rayon-demo/src/matmul/bench.rs index 6426357ef..81333495e 100644 --- a/rayon-demo/src/matmul/bench.rs +++ b/rayon-demo/src/matmul/bench.rs @@ -1,5 +1,3 @@ -use test; - const ROW_SIZE: usize = 256; #[bench] diff --git a/rayon-demo/src/matmul/mod.rs b/rayon-demo/src/matmul/mod.rs index 954e8877e..a74ac7ef4 100644 --- a/rayon-demo/src/matmul/mod.rs +++ b/rayon-demo/src/matmul/mod.rs @@ -17,7 +17,6 @@ pub struct Args { } use docopt::Docopt; -use rayon; use rayon::prelude::*; use std::time::Instant; diff --git a/rayon-demo/src/mergesort/bench.rs b/rayon-demo/src/mergesort/bench.rs index a643ebbd5..ad6a23d5d 100644 --- a/rayon-demo/src/mergesort/bench.rs +++ b/rayon-demo/src/mergesort/bench.rs @@ -1,5 +1,3 @@ -use test; - // Size to use when doing `cargo bench`; extensively tuned to run in // "not too long" on my laptop -nmatsakis const BENCH_SIZE: usize = 250_000_000 / 512; diff --git a/rayon-demo/src/mergesort/mod.rs b/rayon-demo/src/mergesort/mod.rs index eb5435e9d..f7813deba 100644 --- a/rayon-demo/src/mergesort/mod.rs +++ b/rayon-demo/src/mergesort/mod.rs @@ -25,7 +25,6 @@ pub struct Args { } use docopt::Docopt; -use rayon; use std::cmp::max; use std::time::Instant; diff --git a/rayon-demo/src/nbody/bench.rs b/rayon-demo/src/nbody/bench.rs index 1e44b388e..032ccbbb6 100644 --- a/rayon-demo/src/nbody/bench.rs +++ b/rayon-demo/src/nbody/bench.rs @@ -1,5 +1,3 @@ -use test; - use super::nbody::NBodyBenchmark; // Because benchmarks run iteratively, use smaller constants by default: diff --git a/rayon-demo/src/nbody/mod.rs b/rayon-demo/src/nbody/mod.rs index b359a89e2..c65febcde 100644 --- a/rayon-demo/src/nbody/mod.rs +++ b/rayon-demo/src/nbody/mod.rs @@ -1,5 +1,4 @@ use docopt::Docopt; -use time; #[cfg(test)] mod bench; diff --git a/rayon-demo/src/pythagoras/mod.rs b/rayon-demo/src/pythagoras/mod.rs index 980f12ade..5d5b88a1e 100644 --- a/rayon-demo/src/pythagoras/mod.rs +++ b/rayon-demo/src/pythagoras/mod.rs @@ -6,7 +6,6 @@ use rayon::prelude::*; use rayon::range::Iter; use std::ops::Add; use std::usize; -use test; /// Use Euclid's formula to count Pythagorean triples /// diff --git a/rayon-demo/src/quicksort/bench.rs b/rayon-demo/src/quicksort/bench.rs index 70620ec1c..5b4fc1e7b 100644 --- a/rayon-demo/src/quicksort/bench.rs +++ b/rayon-demo/src/quicksort/bench.rs @@ -1,5 +1,3 @@ -use test; - use super::{Parallel, Sequential}; // Size to use when doing `cargo bench`; extensively tuned to run in diff --git a/rayon-demo/src/quicksort/mod.rs b/rayon-demo/src/quicksort/mod.rs index 504e16830..36696d496 100644 --- a/rayon-demo/src/quicksort/mod.rs +++ b/rayon-demo/src/quicksort/mod.rs @@ -25,7 +25,6 @@ pub struct Args { use docopt::Docopt; use rand::distributions::Standard; use rand::Rng; -use rayon; use std::time::Instant; pub trait Joiner { diff --git a/rayon-demo/src/sieve/bench.rs b/rayon-demo/src/sieve/bench.rs index 79077384d..8125fbe0b 100644 --- a/rayon-demo/src/sieve/bench.rs +++ b/rayon-demo/src/sieve/bench.rs @@ -1,5 +1,3 @@ -use test; - use super::NUM_PRIMES; const MAGNITUDE: usize = 7; diff --git a/rayon-demo/src/sieve/mod.rs b/rayon-demo/src/sieve/mod.rs index 5ea1f6297..1f4c5079a 100644 --- a/rayon-demo/src/sieve/mod.rs +++ b/rayon-demo/src/sieve/mod.rs @@ -42,7 +42,6 @@ mod bench; use docopt::Docopt; use odds::stride::StrideMut; use rayon::prelude::*; -use time; const CHUNK_SIZE: usize = 100_000; diff --git a/rayon-demo/src/tsp/bench.rs b/rayon-demo/src/tsp/bench.rs index 9aecd3c68..28692ac7b 100644 --- a/rayon-demo/src/tsp/bench.rs +++ b/rayon-demo/src/tsp/bench.rs @@ -1,5 +1,4 @@ use std::path::Path; -use test; use super::graph::Node; use super::parse_solver; diff --git a/rayon-demo/src/tsp/solver.rs b/rayon-demo/src/tsp/solver.rs index b461b3a22..21c908b6e 100644 --- a/rayon-demo/src/tsp/solver.rs +++ b/rayon-demo/src/tsp/solver.rs @@ -1,4 +1,3 @@ -use rayon; use std::collections::BinaryHeap; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{Arc, Mutex}; diff --git a/src/iter/empty.rs b/src/iter/empty.rs index eb5797c9d..85a2e5fd9 100644 --- a/src/iter/empty.rs +++ b/src/iter/empty.rs @@ -1,7 +1,6 @@ use crate::iter::plumbing::*; use crate::iter::*; -use std; use std::fmt; use std::marker::PhantomData; diff --git a/src/option.rs b/src/option.rs index fc1f7d286..0f56896f0 100644 --- a/src/option.rs +++ b/src/option.rs @@ -7,7 +7,6 @@ use crate::iter::plumbing::*; use crate::iter::*; -use std; use std::sync::atomic::{AtomicBool, Ordering}; /// A parallel iterator over the value in [`Some`] variant of an [`Option`]. diff --git a/src/slice/mergesort.rs b/src/slice/mergesort.rs index 07a3e0c30..a007cae80 100644 --- a/src/slice/mergesort.rs +++ b/src/slice/mergesort.rs @@ -5,7 +5,6 @@ //! `MergesortResult` and leaves descending arrays intact. use crate::iter::*; -use rayon_core; use crate::slice::ParallelSliceMut; use std::mem; use std::mem::size_of; diff --git a/src/slice/quicksort.rs b/src/slice/quicksort.rs index 95df40124..b98507351 100644 --- a/src/slice/quicksort.rs +++ b/src/slice/quicksort.rs @@ -4,7 +4,6 @@ //! The only difference from the original is that calls to `recurse` are executed in parallel using //! `rayon_core::join`. -use rayon_core; use std::cmp; use std::mem; use std::ptr; diff --git a/src/vec.rs b/src/vec.rs index 617cfac18..bfbf9395a 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -7,7 +7,6 @@ use crate::iter::plumbing::*; use crate::iter::*; -use std; /// Parallel iterator that moves out of a vector. #[derive(Debug, Clone)]