Skip to content

Commit 9b92c7d

Browse files
committed
cargo fmt
1 parent e02f439 commit 9b92c7d

File tree

13 files changed

+27
-30
lines changed

13 files changed

+27
-30
lines changed

rayon-core/src/job.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use crossbeam_queue::SegQueue;
21
use crate::latch::Latch;
2+
use crate::unwind;
3+
use crossbeam_queue::SegQueue;
34
use std::any::Any;
45
use std::cell::UnsafeCell;
56
use std::mem;
6-
use crate::unwind;
77

88
pub(super) enum JobResult<T> {
99
None,

rayon-core/src/join/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use crate::job::StackJob;
22
use crate::latch::{LatchProbe, SpinLatch};
33
use crate::log::Event::*;
44
use crate::registry::{self, WorkerThread};
5-
use std::any::Any;
65
use crate::unwind;
6+
use std::any::Any;
77

88
use crate::FnContext;
99

rayon-core/src/join/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//! Tests for the join code.
22
33
use crate::join::*;
4+
use crate::unwind;
5+
use crate::ThreadPoolBuilder;
46
use rand::distributions::Standard;
57
use rand::{Rng, SeedableRng};
68
use rand_xorshift::XorShiftRng;
7-
use crate::unwind;
8-
use crate::ThreadPoolBuilder;
99

1010
fn quick_sort<T: PartialOrd + Send>(v: &mut [T]) {
1111
if v.len() <= 1 {

rayon-core/src/registry.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
use crossbeam_deque::{Steal, Stealer, Worker};
2-
use crossbeam_queue::SegQueue;
31
use crate::job::{JobFifo, JobRef, StackJob};
42
use crate::latch::{CountLatch, Latch, LatchProbe, LockLatch, SpinLatch, TickleLatch};
53
use crate::log::Event::*;
64
use crate::sleep::Sleep;
5+
use crate::unwind;
6+
use crate::util::leak;
7+
use crate::{
8+
ErrorKind, ExitHandler, PanicHandler, StartHandler, ThreadPoolBuildError, ThreadPoolBuilder,
9+
};
10+
use crossbeam_deque::{Steal, Stealer, Worker};
11+
use crossbeam_queue::SegQueue;
712
use std::any::Any;
813
use std::cell::Cell;
914
use std::collections::hash_map::DefaultHasher;
@@ -18,9 +23,6 @@ use std::sync::atomic::{AtomicUsize, Ordering};
1823
use std::sync::{Arc, Once};
1924
use std::thread;
2025
use std::usize;
21-
use crate::unwind;
22-
use crate::util::leak;
23-
use crate::{ErrorKind, ExitHandler, PanicHandler, StartHandler, ThreadPoolBuildError, ThreadPoolBuilder};
2426

2527
/// Thread builder used for customization via
2628
/// [`ThreadPoolBuilder::spawn_handler`](struct.ThreadPoolBuilder.html#method.spawn_handler).

rayon-core/src/scope/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ use crate::job::{HeapJob, JobFifo};
88
use crate::latch::{CountLatch, Latch};
99
use crate::log::Event::*;
1010
use crate::registry::{in_worker, Registry, WorkerThread};
11+
use crate::unwind;
1112
use std::any::Any;
1213
use std::fmt;
1314
use std::marker::PhantomData;
1415
use std::mem;
1516
use std::ptr;
1617
use std::sync::atomic::{AtomicPtr, Ordering};
1718
use std::sync::Arc;
18-
use crate::unwind;
1919

2020
#[cfg(test)]
2121
mod test;

rayon-core/src/scope/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
use crate::unwind;
2+
use crate::ThreadPoolBuilder;
3+
use crate::{scope, scope_fifo, Scope};
14
use rand::{Rng, SeedableRng};
25
use rand_xorshift::XorShiftRng;
36
use std::cmp;
47
use std::iter::once;
58
use std::sync::atomic::{AtomicUsize, Ordering};
69
use std::sync::Mutex;
710
use std::vec;
8-
use crate::unwind;
9-
use crate::ThreadPoolBuilder;
10-
use crate::{scope, scope_fifo, Scope};
1111

1212
#[test]
1313
fn scope_empty() {

rayon-core/src/spawn/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::job::*;
22
use crate::registry::Registry;
3+
use crate::unwind;
34
use std::mem;
45
use std::sync::Arc;
5-
use crate::unwind;
66

77
/// Fires off a task into the Rayon threadpool in the "static" or
88
/// "global" scope. Just like a standard thread, this task is not

rayon-core/src/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#![cfg(test)]
22

3-
use std::sync::atomic::{AtomicUsize, Ordering};
4-
use std::sync::{Arc, Barrier};
53
#[allow(deprecated)]
64
use crate::Configuration;
75
use crate::{ThreadPoolBuildError, ThreadPoolBuilder};
6+
use std::sync::atomic::{AtomicUsize, Ordering};
7+
use std::sync::{Arc, Barrier};
88

99
#[test]
1010
fn worker_thread_index() {

rayon-core/src/thread_pool/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
use crate::join;
77
use crate::registry::{Registry, ThreadSpawn, WorkerThread};
88
use crate::spawn;
9-
use std::error::Error;
10-
use std::fmt;
11-
use std::sync::Arc;
129
#[allow(deprecated)]
1310
use crate::Configuration;
1411
use crate::{scope, Scope};
1512
use crate::{scope_fifo, ScopeFifo};
1613
use crate::{ThreadPoolBuildError, ThreadPoolBuilder};
14+
use std::error::Error;
15+
use std::fmt;
16+
use std::sync::Arc;
1717

1818
mod test;
1919

rayon-demo/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ extern crate serde_derive; // all
4242
extern crate glium; // nbody
4343
#[macro_use]
4444
extern crate lazy_static; // find
45-
#[cfg(windows)]
46-
extern crate winapi; // life
4745
#[cfg(test)]
4846
extern crate test;
47+
#[cfg(windows)]
48+
extern crate winapi; // life
4949

5050
const USAGE: &str = "
5151
Usage: rayon-demo bench

0 commit comments

Comments
 (0)