diff --git a/examples/integrate-thread.rs b/examples/integrate-thread.rs index 06380725..9fc3555b 100644 --- a/examples/integrate-thread.rs +++ b/examples/integrate-thread.rs @@ -2,8 +2,8 @@ use async_std::task; -use std::{thread,time}; use futures::channel::oneshot; +use std::{thread, time}; struct AsyncHandle { handle: thread::JoinHandle, @@ -22,8 +22,7 @@ impl AsyncHandle { } } - -fn spawn(f: F) -> AsyncHandle +fn spawn(f: F) -> AsyncHandle where F: FnOnce() -> T, F: Send + 'static, @@ -39,7 +38,7 @@ where AsyncHandle { handle: thread_handle, - notifier: receiver + notifier: receiver, } }