mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-06 00:00:10 +02:00
chore: apply rustfmt to all crates (#917)
This commit is contained in:
@@ -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