Skip to content

Commit b98bb23

Browse files
committed
Remove unneeded extern crate statements
1 parent 9b92c7d commit b98bb23

File tree

26 files changed

+31
-79
lines changed

26 files changed

+31
-79
lines changed

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ docopt = "1"
3232
lazy_static = "1"
3333
rand = "0.7"
3434
rand_xorshift = "0.2"
35-
serde = "1"
36-
serde_derive = "1"
3735
doc-comment = "0.3"
36+
37+
[dev-dependencies.serde]
38+
version = "1.0.85"
39+
features = ["derive"]

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ as:
7474
rayon = "1.1"
7575
```
7676

77-
and then add the following to your `lib.rs`:
78-
79-
```rust
80-
extern crate rayon;
81-
```
82-
8377
To use the Parallel Iterator APIs, a number of traits have to be in
8478
scope. The easiest way to bring those things into scope is to use the
8579
[Rayon prelude](https://docs.rs/rayon/*/rayon/prelude/index.html). In

ci/compat-Cargo.lock

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/cpu_monitor.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#[macro_use]
2-
extern crate serde_derive;
3-
41
use docopt::Docopt;
52
use std::io;
63
use std::process;
@@ -25,7 +22,7 @@ Options:
2522
-d N, --depth N Control how hard the dummy task works [default: 27]
2623
";
2724

28-
#[derive(Deserialize)]
25+
#[derive(serde::Deserialize)]
2926
pub struct Args {
3027
arg_scenario: String,
3128
flag_depth: usize,

rayon-core/src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ use std::io;
3232
use std::marker::PhantomData;
3333
use std::str::FromStr;
3434

35-
#[cfg(any(debug_assertions))]
36-
#[macro_use]
37-
extern crate lazy_static;
38-
3935
#[macro_use]
4036
mod log;
4137
#[macro_use]
@@ -244,11 +240,9 @@ impl ThreadPoolBuilder {
244240
/// A scoped pool may be useful in combination with scoped thread-local variables.
245241
///
246242
/// ```
247-
/// #[macro_use]
248-
/// extern crate scoped_tls;
249243
/// # use rayon_core as rayon;
250244
///
251-
/// scoped_thread_local!(static POOL_DATA: Vec<i32>);
245+
/// scoped_tls::scoped_thread_local!(static POOL_DATA: Vec<i32>);
252246
///
253247
/// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
254248
/// let pool_data = vec![1, 2, 3];

rayon-core/src/log.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub(super) enum Event {
9090
}
9191

9292
#[cfg(debug_assertions)]
93-
lazy_static! {
93+
lazy_static::lazy_static! {
9494
pub(super) static ref LOG_ENV: bool =
9595
env::var("RAYON_LOG").is_ok() || env::var("RAYON_RS_LOG").is_ok();
9696
}

rayon-core/tests/scoped_threadpool.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
#[macro_use]
2-
extern crate scoped_tls;
3-
41
use crossbeam_utils::thread;
52
use rayon_core::ThreadPoolBuilder;
63

74
#[derive(PartialEq, Eq, Debug)]
85
struct Local(i32);
96

10-
scoped_thread_local!(static LOCAL: Local);
7+
scoped_tls::scoped_thread_local!(static LOCAL: Local);
118

129
#[test]
1310
fn missing_scoped_tls() {

rayon-core/tests/stack_overflow_crash.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#[cfg(unix)]
2-
extern crate libc;
3-
41
use rayon_core::ThreadPoolBuilder;
52

63
use std::env;

rayon-demo/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ odds = "0.3"
1616
rand = "0.7"
1717
rand_xorshift = "0.2"
1818
regex = "1"
19-
serde = "1"
20-
serde_derive = "1"
2119
time = "0.1"
2220

21+
[dependencies.serde]
22+
version = "1.0.85"
23+
features = ["derive"]
24+
2325
[target.'cfg(unix)'.dependencies]
2426
libc = "0.2"
2527

rayon-demo/src/fibonacci/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! unless you have a whole lot of CPUs. The iterative version reveals the
1414
//! joke.
1515
16-
extern crate test;
17-
1816
const N: u32 = 32;
1917
const FN: u32 = 2_178_309;
2018

0 commit comments

Comments
 (0)