mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
chore: apply rustfmt to all crates (#917)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
extern crate env_logger;
|
||||
extern crate futures;
|
||||
extern crate tokio_threadpool;
|
||||
extern crate env_logger;
|
||||
|
||||
use tokio_threadpool::*;
|
||||
use futures::future::{self, Executor};
|
||||
use tokio_threadpool::*;
|
||||
|
||||
use std::sync::mpsc;
|
||||
|
||||
@@ -22,7 +22,9 @@ fn chained_spawn() {
|
||||
tx.execute(future::lazy(move || {
|
||||
spawn(tx2, res_tx, n - 1);
|
||||
Ok(())
|
||||
})).ok().unwrap();
|
||||
}))
|
||||
.ok()
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
extern crate env_logger;
|
||||
extern crate futures;
|
||||
extern crate tokio_threadpool;
|
||||
extern crate env_logger;
|
||||
|
||||
use tokio_threadpool::*;
|
||||
use futures::*;
|
||||
use futures::sync::oneshot;
|
||||
use futures::*;
|
||||
use tokio_threadpool::*;
|
||||
|
||||
pub fn main() {
|
||||
let _ = ::env_logger::init();
|
||||
@@ -12,10 +12,13 @@ pub fn main() {
|
||||
let pool = ThreadPool::new();
|
||||
let tx = pool.sender().clone();
|
||||
|
||||
let res = oneshot::spawn(future::lazy(|| {
|
||||
println!("Running on the pool");
|
||||
Ok::<_, ()>("complete")
|
||||
}), &tx);
|
||||
let res = oneshot::spawn(
|
||||
future::lazy(|| {
|
||||
println!("Running on the pool");
|
||||
Ok::<_, ()>("complete")
|
||||
}),
|
||||
&tx,
|
||||
);
|
||||
|
||||
println!("Result: {:?}", res.wait());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user