Skip to content

Commit

Permalink
Remove useless 'use crate;' in favor of the crate prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Dec 19, 2019
1 parent a1db0fe commit e02f439
Show file tree
Hide file tree
Showing 26 changed files with 0 additions and 37 deletions.
1 change: 0 additions & 1 deletion examples/cpu_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
extern crate serde_derive;

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

Expand Down
2 changes: 0 additions & 2 deletions rayon-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions rayon-core/tests/scope_join.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use rayon_core;

/// Test that one can emulate join with `scope`:
fn pseudo_join<F, G>(f: F, g: G)
where
Expand Down
2 changes: 0 additions & 2 deletions rayon-demo/src/factorial/mod.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 0 additions & 2 deletions rayon-demo/src/fibonacci/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

extern crate test;

use rayon;

const N: u32 = 32;
const FN: u32 = 2_178_309;

Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/join_microbench.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Some microbenchmarks that stress test a pure `join` path.

use rayon;
use rayon::prelude::*;
use std::usize;
use test::Bencher;
Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/life/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions rayon-demo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <demo-name> [ options ]
Expand Down
2 changes: 0 additions & 2 deletions rayon-demo/src/matmul/bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use test;

const ROW_SIZE: usize = 256;

#[bench]
Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/matmul/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pub struct Args {
}

use docopt::Docopt;
use rayon;
use rayon::prelude::*;

use std::time::Instant;
Expand Down
2 changes: 0 additions & 2 deletions rayon-demo/src/mergesort/bench.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/mergesort/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub struct Args {
}

use docopt::Docopt;
use rayon;

use std::cmp::max;
use std::time::Instant;
Expand Down
2 changes: 0 additions & 2 deletions rayon-demo/src/nbody/bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use test;

use super::nbody::NBodyBenchmark;

// Because benchmarks run iteratively, use smaller constants by default:
Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/nbody/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use docopt::Docopt;
use time;

#[cfg(test)]
mod bench;
Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/pythagoras/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
2 changes: 0 additions & 2 deletions rayon-demo/src/quicksort/bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use test;

use super::{Parallel, Sequential};

// Size to use when doing `cargo bench`; extensively tuned to run in
Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/quicksort/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions rayon-demo/src/sieve/bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use test;

use super::NUM_PRIMES;

const MAGNITUDE: usize = 7;
Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/sieve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ mod bench;
use docopt::Docopt;
use odds::stride::StrideMut;
use rayon::prelude::*;
use time;

const CHUNK_SIZE: usize = 100_000;

Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/tsp/bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::path::Path;
use test;

use super::graph::Node;
use super::parse_solver;
Expand Down
1 change: 0 additions & 1 deletion rayon-demo/src/tsp/solver.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use rayon;
use std::collections::BinaryHeap;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
Expand Down
1 change: 0 additions & 1 deletion src/iter/empty.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::iter::plumbing::*;
use crate::iter::*;

use std;
use std::fmt;
use std::marker::PhantomData;

Expand Down
1 change: 0 additions & 1 deletion src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`].
Expand Down
1 change: 0 additions & 1 deletion src/slice/mergesort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/slice/quicksort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

use crate::iter::plumbing::*;
use crate::iter::*;
use std;

/// Parallel iterator that moves out of a vector.
#[derive(Debug, Clone)]
Expand Down

0 comments on commit e02f439

Please sign in to comment.