chore: apply rustfmt to all crates (#917)

This commit is contained in:
Carl Lerche
2019-02-21 11:56:15 -08:00
committed by GitHub
parent ab595d0825
commit 80162306e7
253 changed files with 3710 additions and 3407 deletions
+5 -3
View File
@@ -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();
}
}
+10 -7
View File
@@ -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());
}