forked from mirror/async-std
Make rustfmt happy
This commit is contained in:
parent
adeabe51d2
commit
67fd54c138
1 changed files with 3 additions and 4 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
use async_std::task;
|
use async_std::task;
|
||||||
|
|
||||||
use std::{thread,time};
|
|
||||||
use futures::channel::oneshot;
|
use futures::channel::oneshot;
|
||||||
|
use std::{thread, time};
|
||||||
|
|
||||||
struct AsyncHandle<T> {
|
struct AsyncHandle<T> {
|
||||||
handle: thread::JoinHandle<T>,
|
handle: thread::JoinHandle<T>,
|
||||||
|
@ -22,8 +22,7 @@ impl<T> AsyncHandle<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn spawn<F, T>(f: F) -> AsyncHandle<T>
|
||||||
fn spawn<F,T>(f: F) -> AsyncHandle<T>
|
|
||||||
where
|
where
|
||||||
F: FnOnce() -> T,
|
F: FnOnce() -> T,
|
||||||
F: Send + 'static,
|
F: Send + 'static,
|
||||||
|
@ -39,7 +38,7 @@ where
|
||||||
|
|
||||||
AsyncHandle {
|
AsyncHandle {
|
||||||
handle: thread_handle,
|
handle: thread_handle,
|
||||||
notifier: receiver
|
notifier: receiver,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue