Skip to content

Commit 4a1afcd

Browse files
committed
Make cargo fmt happy
1 parent 0e6b30f commit 4a1afcd

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

benches/blocking.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
extern crate test;
44

55
use async_std::task;
6-
use async_std::task_local;
7-
use test::{black_box, Bencher};
6+
use async_std::task::blocking::JoinHandle;
7+
use futures::future::join_all;
88
use std::thread;
99
use std::time::Duration;
10-
use async_std::task::blocking::JoinHandle;
11-
use futures::future::{join_all};
12-
10+
use test::Bencher;
1311

1412
#[bench]
1513
fn blocking(b: &mut Bencher) {
1614
b.iter(|| {
17-
let handles = (0..10_000).map(|_| {
18-
task::blocking::spawn(async {
19-
let duration = Duration::from_millis(1);
20-
thread::sleep(duration);
15+
let handles = (0..10_000)
16+
.map(|_| {
17+
task::blocking::spawn(async {
18+
let duration = Duration::from_millis(1);
19+
thread::sleep(duration);
20+
})
2121
})
22-
}).collect::<Vec<JoinHandle<()>>>();
22+
.collect::<Vec<JoinHandle<()>>>();
2323

2424
task::block_on(join_all(handles));
2525
});

src/task/blocking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static CURRENT_POOL_SIZE: AtomicU64 = AtomicU64::new(LOW_WATERMARK);
2929

3030
struct Pool {
3131
sender: Sender<async_task::Task<()>>,
32-
receiver: Receiver<async_task::Task<()>>
32+
receiver: Receiver<async_task::Task<()>>,
3333
}
3434

3535
lazy_static! {

0 commit comments

Comments
 (0)