diff --git a/src/main.rs b/src/main.rs index 89e977f..3778f60 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,6 @@ -use std::marker::PhantomData; - use futures::{stream, Future, StreamExt}; -pub struct JoinHandle { - _p: PhantomData, -} +pub struct JoinHandle(T); impl Future for JoinHandle { type Output = Result; @@ -17,10 +13,7 @@ impl Future for JoinHandle { } } -pub fn spawn(future: T) -> JoinHandle -where - T: Future, -{ +pub fn spawn(future: T) -> JoinHandle { loop {} }